更新:我再次尝试并意识到perl说当它试图加载模块时,它会收到“权限被拒绝”错误。所以,我只是使用sudo重新运行脚本......它工作正常。我想它必须是某种权限更改。
原件:
我刚刚将OS X更新到10.10.5,突然之间,Perl无法再找到任何CPAN安装的模块。甚至找不到新安装的模块。我知道更新安装了Perl 5.18.2,但即使我明确使用5.16,模块仍然无法找到。
perl -V的输出在这里:
Summary of my perl5 (revision 5 version 18 subversion 2) configuration: Platform: osname=darwin, osvers=14.0, archname=darwin-thread-multi-2level uname='darwin osx228.apple.com 14.0 darwin kernel version 14.0.0: tue jun 2 11:49:04 pdt 2015; root:xnu-2782.1.97.1.3~1development_x86_64 x86_64 ' config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=cc' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-arch i386 -arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector', optimize='-Os', cppflags='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector' ccversion='', gccversion='4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc -mmacosx-version-min=10.10.5', ldflags ='-arch i386 -arch x86_64 -fstack-protector' libpth=/usr/lib /usr/local/lib libs= perllibs= libc=, so=dylib, useshrplib=true, libperl=libperl.dylib gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-arch i386 -arch x86_64 -bundle -undefined dynamic_lookup -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Locally applied patches: /Library/Perl/Updates/ comes before system perl directories installprivlib and installarchlib points to the Updates directory Built under darwin Compiled at Jul 9 2015 01:30:43 %ENV: PERL5LIB="/Users/jrg/perl5/lib/perl5:" PERL_LOCAL_LIB_ROOT=":/Users/jrg/perl5" PERL_MB_OPT="--install_base /Users/jrg/perl5" PERL_MM_OPT="INSTALL_BASE=/Users/jrg/perl5" @INC: /Users/jrg/perl5/lib/perl5/darwin-thread-multi-2level /Users/jrg/perl5/lib/perl5 /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .
非常感谢任何帮助和建议!
答案 0 :(得分:0)
找到它们无济于事。无论如何你需要重新安装它们。 Perl不保持版本之间的二进制API兼容性(尽管您可以安全地升级到相同版本的较新版本)。
答案 1 :(得分:0)
我会继续回答这个问题,因为我找到了一种工作方式,但它提出了另一个问题:为什么Perl模块的安装位置更改了权限?值得庆幸的是,这只是在我的开发计算机上,没有任何东西可以通过网络访问,我使用的是linux服务器。
我再次尝试并意识到perl说当它试图加载模块时,它得到了一个“#34;许可被拒绝”#34;错误。所以,我只是使用sudo重新运行脚本......它工作正常。我想它必须是某种权限更改。