我在使用Cygwin安装CPAN模块Text :: CSV_XS时遇到问题。
我做了
$ cpan Text::CSV_XS
CPAN: Storable loaded ok (v2.20)
.... Every was good till:.....
Writing Makefile for Text::CSV_XS
cp CSV_XS.pm blib/lib/Text/CSV_XS.pm
/usr/bin/perl.exe /usr/lib/perl5/5.10/ExtUtils/xsubpp -typemap /usr/lib/perl5/5 .10/ExtUtils/typemap CSV_XS.xs > CSV_XS.xsc && mv CSV_XS.xsc CSV_XS.c
gcc-4 -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing -p ipe -fstack-protector -I/usr/local/include -DUSEIMPORTLIB -O3 -DVERSION=\"0.8 8\" -DXS_VERSION=\"0.88\" "-I/usr/lib/perl5/5.10/i686-cygwin/CORE" CSV_XS.c
/bin/sh: gcc-4: command not found
Makefile:330: recipe for target `CSV_XS.o' failed
make: *** [CSV_XS.o] Error 127
HMBRAND/Text-CSV_XS-0.88.tgz
make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
我之前安装了另一个模块,没有问题。
Make is installed
gcc is installed
/ bin / sh返回一个新shell。
$ /bin/sh
$
答案 0 :(得分:7)
重要提示:在撰写本文时,gcc4现在位于过时的软件包部分,默认情况下,它隐藏在Cygwin安装程序中。
答案 1 :(得分:6)
启动Cygwin packagre经理(setup.exe
)并安装gcc4
。使用搜索工具在管理器中找到包。在您使用它的同时,还要安装make
,autoconf
和automake
。您可以在devel
部分找到所有这些包。
然后重试,它会成功,我只是测试了它:
MiLu@Dago: ~ > cpan Text::CSV_XS
...
Installing /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Text/CSV_XS/CSV_XS.bs
Installing /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Text/CSV_XS/CSV_XS.dll
Installing /usr/lib/perl5/site_perl/5.10/i686-cygwin/Text/CSV_XS.pm
Installing /usr/share/man/man3/Text.CSV_XS.3pm
Appending installation info to /usr/lib/perl5/5.10/i686-cygwin/perllocal.pod
HMBRAND/Text-CSV_XS-0.88.tgz
/usr/bin/make install -- OK