我已经解决了这个问题几天,即使在阅读了其他几个博客之后也找不到任何解决方案。
每当我尝试使用CPAN安装模块时,这些安装都会失败,因为' make'错误。
cpan[1]> install Clone
CPAN: Storable loaded ok (v2.18)
Reading '/Users/erikhanschen/.cpan/Metadata'
Database was generated on Wed, 11 Jun 2014 12:06:12 GMT
CPAN: YAML loaded ok (v0.92)
CPAN: Time::HiRes loaded ok (v1.9711)
Reading 49 yaml files from /Users/erikhanschen/.cpan/build/
DONE
Restored the state of none (in 1.7859 secs)
Running install for module 'Clone'
GARU/Clone-0.37.tar.gz
Has already been unwrapped into directory /Users/erikhanschen/.cpan/build/Clone-0.37-F3R5u0
GARU/Clone-0.37.tar.gz
Has already been prepared
GARU/Clone-0.37.tar.gz
Could not make: Unknown error
CPAN: CPAN::Meta loaded ok (v2.120351)
cpan[2]>
最近我不得不更换硬盘后,我不得不重新安装Xcode,但即使在那之后,make命令也无法正常工作。卸载Xcode并安装GCC编译器并没有帮助。 make
位于/usr/bin/
,该目录位于我的PATH中,make和GCC在没有参数的情况下运行时运行,但CPAN安装程序在我尝试时仍无法找到它安装模块。
删除CPAN构建目录的内容后,尝试安装模块仍然会在" make"。
崩溃。 cpan[2]> install Clone
Running install for module 'Clone'
CPAN: Digest::SHA loaded ok (v5.45)
CPAN: Compress::Zlib loaded ok (v2.008)
Checksum for /Users/erikhanschen/.cpan/sources/authors/id/G/GA/GARU/Clone- 0.37.tar.gz ok
Scanning cache /Users/erikhanschen/.cpan/build for sizes
DONE
CPAN: Archive::Tar loaded ok (v1.96)
x Clone-0.37/
x Clone-0.37/Changes
x Clone-0.37/Clone.pm
x Clone-0.37/Clone.xs
x Clone-0.37/Makefile.PL
x Clone-0.37/MANIFEST
x Clone-0.37/META.json
x Clone-0.37/META.yml
x Clone-0.37/README
x Clone-0.37/t/
x Clone-0.37/t/01array.t
x Clone-0.37/t/02hash.t
x Clone-0.37/t/03scalar.t
x Clone-0.37/t/04tie.t
x Clone-0.37/t/05dtype.t
x Clone-0.37/t/06refcnt.t
x Clone-0.37/t/07magic.t
x Clone-0.37/t/08fieldhash.t
x Clone-0.37/t/dclone.t
x Clone-0.37/t/dump.pl
x Clone-0.37/t/tied.pl
CPAN: File::Temp loaded ok (v0.2304)
CPAN: Module::CoreList loaded ok (v2.13)
Configuring G/GA/GARU/Clone-0.37.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
'EXPATINCPATH' is not a known MakeMaker parameter name.
'EXPATLIBPATH' is not a known MakeMaker parameter name.
Generating a Unix-style Makefile
Writing Makefile for Clone
Writing MYMETA.yml and MYMETA.json
GARU/Clone-0.37.tar.gz
/usr/bin/perl Makefile.PL EXPATLIBPATH=/non-standard/lib EXPATINCPATH=/non-standard/include -- OK
Running make for G/GA/GARU/Clone-0.37.tar.gz
cp Clone.pm blib/lib/Clone.pm
AutoSplitting blib/lib/Clone.pm (blib/lib/auto/Clone)
Running Mkbootstrap for Clone ()
chmod 644 Clone.bs
/usr/bin/perl /Library/Perl/Updates/5.10.0/ExtUtils/xsubpp -typemap /System/Library/Perl/5.10.0/ExtUtils/typemap Clone.xs > Clone.xsc && mv Clone.xsc Clone.c
gcc-4.2 -c -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -O3 -DVERSION=\"0.37\" -DXS_VERSION=\"0.37\" "- I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE" Clone.c
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
lipo: can't open input file: /var/tmp//cc23LjqR.out (No such file or directory)
make: *** [Clone.o] Error 2
GARU/Clone-0.37.tar.gz
/usr/bin/make -- NOT OK
Failed during this command:
GARU/Clone-0.37.tar.gz : make NO
我已经更新了perl,CPAN和Module :: Build。我认为下一步是升级到10.7,10.8或10.9并尝试直接从Apple重新安装命令行工具。
思想?
答案 0 :(得分:0)
我不得不重新安装Xcode,但即使在那之后,make命令也无效......
安装命令行工具。打开Xcode,然后转到 Xcode→首选项→下载 。