Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1055823
  • 博文数量: 171
  • 博客积分: 55
  • 博客等级: 民兵
  • 技术积分: 2077
  • 用 户 组: 普通用户
  • 注册时间: 2012-01-04 10:11
个人简介

pugna

文章分类

全部博文(171)

文章存档

2021年(4)

2020年(1)

2019年(4)

2018年(5)

2017年(7)

2016年(9)

2015年(36)

2014年(8)

2013年(96)

2012年(1)

分类: PERL

2013-11-28 17:00:05

CentOS 5安装Perl的 Text::CSV_XS 模块



[root@testos ~]# perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7602)
ReadLine support available (try 'install Bundle::CPAN')

cpan> install Text::CSV_XS
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Warning: Found only 0 objects in /root/.cpan/Metadata
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok
Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/modules/02packages.details.txt.gz
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
  Database was generated on Thu, 28 Nov 2013 08:17:03 GMT

  There's a new CPAN.pm version (v2.00) available!
  [Current version is v1.7602]
  You might want to try
    install Bundle::CPAN
    reload cpan
  without quitting the current session. It should be a seamless upgrade
  while we are running...

Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/modules/03modlist.data.gz
Going to read /root/.cpan/sources/modules/03modlist.data.gz
Going to write /root/.cpan/Metadata
Running install for module Text::CSV_XS
Running make for H/HM/HMBRAND/Text-CSV_XS-1.02.tgz
Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.02.tgz
CPAN: Digest::MD5 loaded ok
Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/authors/id/H/HM/HMBRAND/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.02.tgz ok
Scanning cache /root/.cpan/build for sizes
Text-CSV_XS-1.02/
Text-CSV_XS-1.02/examples/
Text-CSV_XS-1.02/examples/parser-xs.pl
Text-CSV_XS-1.02/examples/speed.pl
Text-CSV_XS-1.02/examples/csv2xls
Text-CSV_XS-1.02/examples/csvdiff
Text-CSV_XS-1.02/examples/csv-check
Text-CSV_XS-1.02/ChangeLog
Text-CSV_XS-1.02/META.yml
Text-CSV_XS-1.02/MANIFEST
Text-CSV_XS-1.02/ppport.h
Text-CSV_XS-1.02/Makefile.PL
Text-CSV_XS-1.02/CSV_XS.xs
Text-CSV_XS-1.02/files/
Text-CSV_XS-1.02/files/macosx.csv
Text-CSV_XS-1.02/files/utf8.csv
Text-CSV_XS-1.02/README
Text-CSV_XS-1.02/META.json
Text-CSV_XS-1.02/t/
Text-CSV_XS-1.02/t/46_eol_si.t
Text-CSV_XS-1.02/t/20_file.t
Text-CSV_XS-1.02/t/76_magic.t
Text-CSV_XS-1.02/t/81_subclass.t
Text-CSV_XS-1.02/t/util.pl
Text-CSV_XS-1.02/t/40_misc.t
Text-CSV_XS-1.02/t/70_rt.t
Text-CSV_XS-1.02/t/22_scalario.t
Text-CSV_XS-1.02/t/21_lexicalio.t
Text-CSV_XS-1.02/t/77_getall.t
Text-CSV_XS-1.02/t/12_acc.t
Text-CSV_XS-1.02/t/00_pod.t
Text-CSV_XS-1.02/t/60_samples.t
Text-CSV_XS-1.02/t/01_pod.t
Text-CSV_XS-1.02/t/75_hashref.t
Text-CSV_XS-1.02/t/65_allow.t
Text-CSV_XS-1.02/t/50_utf8.t
Text-CSV_XS-1.02/t/41_null.t
Text-CSV_XS-1.02/t/30_types.t
Text-CSV_XS-1.02/t/51_utf8.t
Text-CSV_XS-1.02/t/10_base.t
Text-CSV_XS-1.02/t/55_combi.t
Text-CSV_XS-1.02/t/80_diag.t
Text-CSV_XS-1.02/t/45_eol.t
Text-CSV_XS-1.02/t/15_flags.t
Text-CSV_XS-1.02/CSV_XS.pm

  CPAN.pm: Going to build H/HM/HMBRAND/Text-CSV_XS-1.02.tgz

Checking if your kit is complete...
Looks good
Writing Makefile for Text::CSV_XS
cp CSV_XS.pm blib/lib/Text/CSV_XS.pm
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap  CSV_XS.xs > CSV_XS.xsc && mv CSV_XS.xsc CSV_XS.c
gcc -c   -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"1.02\" -DXS_VERSION=\"1.02\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"   CSV_XS.c
CSV_XS.xs: In function ‘cx_Print’:
CSV_XS.xs:627: warning: unused variable ‘l’
CSV_XS.xs: In function ‘cx_c_xsParse’:
CSV_XS.xs:1450: warning: unused variable ‘sp’
CSV_XS.c: In function ‘XS_Text__CSV_XS_error_input’:
CSV_XS.xs:1665: warning: unused variable ‘hv’
CSV_XS.c: At top level:
CSV_XS.xs:1546: warning: ‘cx_av_free’ defined but not used
Running Mkbootstrap for Text::CSV_XS ()
chmod 644 CSV_XS.bs
rm -f blib/arch/auto/Text/CSV_XS/CSV_XS.so
gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic CSV_XS.o  -o blib/arch/auto/Text/CSV_XS/CSV_XS.so     \
             \
      
chmod 755 blib/arch/auto/Text/CSV_XS/CSV_XS.so
cp CSV_XS.bs blib/arch/auto/Text/CSV_XS/CSV_XS.bs
chmod 644 blib/arch/auto/Text/CSV_XS/CSV_XS.bs
Manifying blib/man3/Text::CSV_XS.3pm
  /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
t/00_pod..........skipped
        all skipped: Test::Pod 1.00 required for testing POD
t/01_pod..........skipped
        all skipped: Test::Pod::Coverage required for testing POD Coverage
t/10_base.........ok                                                         
t/12_acc..........ok                                                         
t/15_flags........ok                                                         
t/20_file.........ok                                                         
t/21_lexicalio....ok                                                         
t/22_scalario.....ok                                                         
t/30_types........ok                                                         
t/40_misc.........ok                                                         
t/41_null.........ok                                                         
t/45_eol..........ok                                                         
t/46_eol_si.......ok                                                         
t/50_utf8.........ok                                                         
t/51_utf8.........ok                                                         
t/55_combi........ok                                                         
t/60_samples......ok                                                         
t/65_allow........ok                                                         
t/70_rt...........ok                                                         
        20000/20453 skipped: Encode is too old for these tests
t/75_hashref......ok                                                         
t/76_magic........ok                                                         
t/77_getall.......ok                                                         
t/80_diag.........ok                                                         
t/81_subclass.....ok                                                         
All tests successful, 2 tests and 20000 subtests skipped.
Files=24, Tests=33652,  4 wallclock secs ( 2.29 cusr +  0.33 csys =  2.62 CPU)
  /usr/bin/make test -- OK
Running make install
Installing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Text/CSV_XS/CSV_XS.bs
Installing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Text/CSV_XS/CSV_XS.so
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Text/CSV_XS.pm
Installing /usr/share/man/man3/Text::CSV_XS.3pm
Writing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Text/CSV_XS/.packlist
Appending installation info to /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod
  /usr/bin/make install  -- OK

cpan> quit
Terminal does not support GetHistory.
Lockfile removed.


如果执行 perl -MCPAN -e shell 的时候报 Can't locate CPAN.pm in @INC 的错误
检查是否安装了perl-CPAN
rpm -qa | grep perl-CPAN
如果没安装,使用yum直接安装 yum install perl-CPAN



参考:





阅读(6605) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~