Impossibile installare File :: HomeDir utilizzando cpan su MacOS Mojave per MacTex

1

Sto tentando di impostare Estensione Workshop LaTeX per codice Visual Studio. Ho Distribuzione MacTeX-2018 che ho installato utilizzando la botte di Homebrew . Non riesco a configurare la formattazione. Gli errori mi portano alla risposta per il problema GitHub LaTeX-Workshop . I primi tre comandi hanno funzionato bene per me:

sudo cpan Unicode::GCString
sudo cpan App::cpanminus
sudo cpan YAML::Tiny

Sfortunatamente, provando a eseguire l'ultimo (ho anche provato sudo perl -MCPAN -e 'install "File::HomeDir"' a dare ed errore e una dipendenza insoddisfatta:

Vitaliis-MacBook-Pro:~ vitalii$ sudo cpan File::HomeDir
Reading '/Users/vitalii/.cpan/Metadata'
  Database was generated on Thu, 01 Nov 2018 08:29:03 GMT
Running install for module 'File::HomeDir'
Running make for R/RE/REHSACK/File-HomeDir-1.004.tar.gz
Checksum for /Users/vitalii/.cpan/sources/authors/id/R/RE/REHSACK/File-HomeDir-1.004.tar.gz ok

  CPAN.pm: Building R/RE/REHSACK/File-HomeDir-1.004.tar.gz

Checking if your kit is complete...
Looks good
Warning: prerequisite Mac::SystemDirectory 0.04 not found.
Writing Makefile for File::HomeDir
Writing MYMETA.yml and MYMETA.json
---- Unsatisfied dependencies detected during ----
----     REHSACK/File-HomeDir-1.004.tar.gz    ----
    Mac::SystemDirectory [requires]
Running make test
  Delayed until after prerequisites
Running make install
  Delayed until after prerequisites
Running install for module 'Mac::SystemDirectory'
Running make for E/ET/ETHER/Mac-SystemDirectory-0.10.tar.gz
Checksum for /Users/vitalii/.cpan/sources/authors/id/E/ET/ETHER/Mac-SystemDirectory-0.10.tar.gz ok

  CPAN.pm: Building E/ET/ETHER/Mac-SystemDirectory-0.10.tar.gz

HASCOMPILERuX_i/TEST5U_g.c:2:10: fatal error: 'EXTERN.h' file not found
#include "EXTERN.h"
         ^~~~~~~~~~
1 error generated.
Couldn't execute cc  -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os "-I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE"   -c HASCOMPILERuX_i/TEST5U_g.c -o HASCOMPILERuX_i/TEST5U_g.o: Inappropriate ioctl for device at Makefile.PL line 14.
Requires a compiler
Warning: No success on command[/usr/bin/perl Makefile.PL]
'YAML' not installed, will not store persistent state
  ETHER/Mac-SystemDirectory-0.10.tar.gz
  /usr/bin/perl Makefile.PL -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Running make for R/RE/REHSACK/File-HomeDir-1.004.tar.gz
  Has already been unwrapped into directory /Users/vitalii/.cpan/build/File-HomeDir-1.004-KoTD4b

  CPAN.pm: Building R/RE/REHSACK/File-HomeDir-1.004.tar.gz

Warning: Prerequisite 'Mac::SystemDirectory => 0.04' for 'REHSACK/File-HomeDir-1.004.tar.gz' failed when processing 'ETHER/Mac-SystemDirectory-0.10.tar.gz' with 'writemakefile => NO '/usr/bin/perl Makefile.PL' returned status 6400'. Continuing, but chances to succeed are limited.
cp lib/File/HomeDir/FreeDesktop.pm blib/lib/File/HomeDir/FreeDesktop.pm
cp lib/File/HomeDir/Driver.pm blib/lib/File/HomeDir/Driver.pm
cp lib/File/HomeDir/Unix.pm blib/lib/File/HomeDir/Unix.pm
cp lib/File/HomeDir/Windows.pm blib/lib/File/HomeDir/Windows.pm
cp lib/File/HomeDir/MacOS9.pm blib/lib/File/HomeDir/MacOS9.pm
cp lib/File/HomeDir/Test.pm blib/lib/File/HomeDir/Test.pm
cp lib/File/HomeDir/Darwin.pm blib/lib/File/HomeDir/Darwin.pm
cp lib/File/HomeDir/Darwin/Carbon.pm blib/lib/File/HomeDir/Darwin/Carbon.pm
cp lib/File/HomeDir/Darwin/Cocoa.pm blib/lib/File/HomeDir/Darwin/Cocoa.pm
cp lib/File/HomeDir.pm blib/lib/File/HomeDir.pm
Manifying blib/man3/File::HomeDir::Darwin::Cocoa.3pm
Manifying blib/man3/File::HomeDir::MacOS9.3pm
Manifying blib/man3/File::HomeDir::Darwin.3pm
Manifying blib/man3/File::HomeDir.3pm
Manifying blib/man3/File::HomeDir::FreeDesktop.3pm
Manifying blib/man3/File::HomeDir::Unix.3pm
Manifying blib/man3/File::HomeDir::Darwin::Carbon.3pm
Manifying blib/man3/File::HomeDir::Test.3pm
Manifying blib/man3/File::HomeDir::Driver.3pm
Manifying blib/man3/File::HomeDir::Windows.3pm
  REHSACK/File-HomeDir-1.004.tar.gz
  /usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t xt/*.t
t/01_compile.t ........ 1/11 # Implemented by: File::HomeDir::Darwin
t/01_compile.t ........ ok     
t/02_main.t ........... # $<: 0 -- $(: 0 0 1 2 3 4 5 8 9 12 20 29 61 80 33 98 100 204 250 395 398 399 701
t/02_main.t ........... ok     
t/10_test.t ........... ok     
t/11_darwin.t ......... ok   
t/12_darwin_carbon.t .. skipped: Not running on 32-bit Darwin
t/13_darwin_cocoa.t ... skipped: Not running on Darwin with Cocoa API using Mac::SystemDirectory
t/20_empty_home.t ..... ok   
All tests successful.
Files=7, Tests=90,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.40 cusr  0.08 csys =  0.52 CPU)
Result: PASS
  REHSACK/File-HomeDir-1.004.tar.gz
Tests succeeded but one dependency not OK (Mac::SystemDirectory)
  REHSACK/File-HomeDir-1.004.tar.gz
  [dependencies] -- NA
Running make install
  make test had returned bad status, won't install without force

Ho anche provato ad installare la dipendenza insoddisfatta menzionata. Di nuovo, ho riscontrato il seguente errore nel tentativo di installare il modulo Mac :: SystemDirectory utilizzando cpan :

Vitaliis-MacBook-Pro:~ vitalii$ sudo cpan Mac::SystemDirectory
Password:
Reading '/Users/vitalii/.cpan/Metadata'
  Database was generated on Thu, 01 Nov 2018 08:29:03 GMT
Running install for module 'Mac::SystemDirectory'
Running make for E/ET/ETHER/Mac-SystemDirectory-0.10.tar.gz
Checksum for /Users/vitalii/.cpan/sources/authors/id/E/ET/ETHER/Mac-SystemDirectory-0.10.tar.gz ok

  CPAN.pm: Building E/ET/ETHER/Mac-SystemDirectory-0.10.tar.gz

HASCOMPILERRgwh/TESTb9zf.c:2:10: fatal error: 'EXTERN.h' file not found
#include "EXTERN.h"
         ^~~~~~~~~~
1 error generated.
Couldn't execute cc  -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os "-I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE"   -c HASCOMPILERRgwh/TESTb9zf.c -o HASCOMPILERRgwh/TESTb9zf.o: Inappropriate ioctl for device at Makefile.PL line 14.
Requires a compiler
Warning: No success on command[/usr/bin/perl Makefile.PL]
'YAML' not installed, will not store persistent state
  ETHER/Mac-SystemDirectory-0.10.tar.gz
  /usr/bin/perl Makefile.PL -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install

Il mio sistema operativo è MacOS Mojave 10.14 .
Ho installato xCode versione 10.1 .
Ho make installato:

Vitaliis-MacBook-Pro:~ vitalii$ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

Ho anche clang compiler

Vitaliis-MacBook-Pro:~ vitalii$ cc -v
Apple LLVM version 10.0.0 (clang-1000.10.44.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Come ho riscontrato alcuni problemi dopo l'aggiornamento a Mojave (non potevo usare git), ho già seguito le istruzioni nella risposta per questo post .
Potresti aiutarmi?
Link correlati:
link
link

    
posta Vitalii Isaenko 01.11.2018 - 23:11
fonte

1 risposta

1

Ho avuto lo stesso identico problema e ho trovato una soluzione alternativa:

  1. Installa la versione corrente di Perl usando Homebrew: brew install perl
  2. Verifica se xcode-select -p punta agli strumenti della riga di comando. In caso contrario, esegui xcode-select --switch /Library/Developer/CommandLineTools
  3. Installa Mac :: SystemDirectory utilizzando cpan (non cpanm): cpan Mac::SystemDirectory

Non ho esperienza con Perl e non ho idea del perché abbia funzionato, ma ha funzionato:)

    
risposta data 19.11.2018 - 11:56
fonte

Leggi altre domande sui tag