简体   繁体   中英

Perl CSV_XS module installation failed using Cygwin

I am having problems installed a CPAN module Text::CSV_XS using Cygwin.

I did a

$ 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

I installed another module earlier, without problem.

Make is installed
gcc is installed

/bin/sh returns a new shell.

$ /bin/sh

$

重要说明:在撰写本文时,gcc4现在位于过时的软件包部分,默认情况下在Cygwin安装程序中隐藏。

Fire up the Cygwin packagre manager ( setup.exe ) and install gcc4 . Use the search facility to locate the package in the manager. While you're at it, also install make , autoconf and automake . You'll find all these packages in the devel section.

Then retry, it will succeed, I just tested it:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM