1

我正在尝试将 perl 从源代码安装到 CentOS 6 上的本地目录中。我在使用 cpan 安装某些软件包时遇到问题。我通过安装一些开发 rpm 解决了一堆问题,我通过在配置行中告诉 perl CentOS 是 64 位解决了更多问题。但是我在安装 Apache2::TaintRequest 时遇到了问题,我运气不好。过去几天我一直在谷歌搜索和重新编译,所以希望这不是一个愚蠢的问题......

这就是我正在做的事情。

    yum -y install libxml2-devel openssl-devel vsftpd emacs alpine xorg-x11-xauth
    yum -y xorg-x11-fonts* gd gd-devel expat mod_perl gdbm gdbm-devel httpd-devel
    yum -y mod_ssl slang slang-devel expat expat-devel gmp gmp-devel curl
    yum -y curl-devel jemalloc jemalloc-devel
    mkdir /local_perl
    cd /root/
    wget http://www.cpan.org/src/5.0/perl-5.18.0.tar.gz
    tar -xzxf /root/initial_install/perl-5.18.0.tar.gz
    cd perl-5.18.0
    CFLAGS='-m64 -mtune=nocona' ./Configure -des -A ccflags="-fPIC -m64" \
      -Dprefix=/local_perl -Aldflags='-lresolv -lnsl -ldl -lm -lcrypt -lutil -lc'
    make
    make test
    make install
    /local_perl/bin/cpan
    /local_perl/bin/cpan Bundle::CPAN
    /local_perl/bin/cpan -i YAML
    /local_perl/bin/cpan -i Net::OpenID::Consumer
    /local_perl/bin/cpan -i Apache2::RequestRec
    /local_perl/bin/cpan -i Apache2::TaintRequest # fails

这是我得到的地方,这是输出

    [STL root@mgs26 perl-5.18.0]# /local_perl/bin/cpan -i Apache2::TaintRequest #
    CPAN: Storable loaded ok (v2.41)
    Reading '/root/.cpan/Metadata'
      Database was generated on Mon, 12 Aug 2013 19:53:03 GMT
    Running install for module 'Apache2::TaintRequest'
    Running make for P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz
    CPAN: Digest::SHA loaded ok (v5.85)
    CPAN: Compress::Zlib loaded ok (v2.062)
    Checksum for /root/.cpan/sources/authors/id/P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz ok
    CPAN: File::Temp loaded ok (v0.2301)
    CPAN: Parse::CPAN::Meta loaded ok (v1.4405)
    CPAN: CPAN::Meta loaded ok (v2.120921)
    CPAN: Module::CoreList loaded ok (v2.90)

      CPAN.pm: Building P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz

    Checking if your kit is complete...
    Looks good
    Warning: prerequisite Taint 0 not found.
    Writing Makefile for Apache2::TaintRequest
    Writing MYMETA.yml and MYMETA.json
    ---- Unsatisfied dependencies detected during ----
    ----  PHRED/Apache2-TaintRequest-0.01.tar.gz  ----
        Taint [requires]
    Running make test
      Delayed until after prerequisites
    Running make install
      Delayed until after prerequisites
    Running install for module 'Taint'
    Running make for P/PH/PHOENIX/Taint-0.09.tar.gz
    Checksum for /root/.cpan/sources/authors/id/P/PH/PHOENIX/Taint-0.09.tar.gz ok

      CPAN.pm: Building P/PH/PHOENIX/Taint-0.09.tar.gz

    Checking if your kit is complete...
    Looks good
    Writing Makefile for Taint
    Writing MYMETA.yml and MYMETA.json
    cp Taint.pm blib/lib/Taint.pm
    Manifying blib/man3/Taint.3
      PHOENIX/Taint-0.09.tar.gz
      /usr/bin/make -- OK
    CPAN: YAML loaded ok (v0.84)
    Running make test
    PERL_DL_NONLAZY=1 /local_perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
    t/0-basic.t .... Failed 4/52 subtests 
    t/no-taint.t ... ok   
    t/tied.t ....... All 11 subtests passed 
    t/u-untaint.t .. ok     

    Test Summary Report
    -------------------
    t/0-basic.t  (Wstat: 0 Tests: 52 Failed: 4)
      Failed tests:  32, 38-40
    t/tied.t     (Wstat: 0 Tests: 12 Failed: 1)
      Failed test:  12
      Parse errors: Bad plan.  You planned 11 tests but ran 12.
    Files=4, Tests=78,  0 wallclock secs ( 0.07 usr  0.02 sys +  0.07 cusr  0.04 csys =  0.20 CPU)
    Result: FAIL
    Failed 2/4 test programs. 5/78 subtests failed.
    make: *** [test_dynamic] Error 255
      PHOENIX/Taint-0.09.tar.gz
      /usr/bin/make test -- NOT OK
    //hint// to see the cpan-testers results for installing this module, try:
      reports PHOENIX/Taint-0.09.tar.gz
    Running make install
      make test had returned bad status, won't install without force
    Running make for P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz
      Has already been unwrapped into directory /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt

      CPAN.pm: Building P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz

    Warning: Prerequisite 'Taint => 0' for 'PHRED/Apache2-TaintRequest-0.01.tar.gz' failed when processing 'PHOENIX/Taint-0.09.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited.
    CPAN: Time::HiRes loaded ok (v1.9725)
    cp lib/Apache2/TaintRequest.pm blib/lib/Apache2/TaintRequest.pm
    Manifying blib/man3/Apache2::TaintRequest.3
      PHRED/Apache2-TaintRequest-0.01.tar.gz
      /usr/bin/make -- OK
    Running make test
    PERL_DL_NONLAZY=1 /local_perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
    t/Apache2-TaintRequest.t .. 1/1 
    #   Failed test 'use Apache2::TaintRequest;'
    #   at t/Apache2-TaintRequest.t line 7.
    #     Tried to use 'Apache2::TaintRequest'.
    #     Error:  Can't locate Taint.pm in @INC (you may need to install the Taint module) (@INC contains: /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt/blib/lib /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt/blib/arch /local_perl/lib/site_perl/5.18.0/x86_64-linux /local_perl/lib/site_perl/5.18.0 /local_perl/lib/5.18.0/x86_64-linux /local_perl/lib/5.18.0) at /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt/blib/lib/Apache2/TaintRequest.pm line 29.
    # BEGIN failed--compilation aborted at /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt/blib/lib/Apache2/TaintRequest.pm line 29.
    # Compilation failed in require at (eval 4) line 2.
    # BEGIN failed--compilation aborted at (eval 4) line 2.
    # Looks like you failed 1 test of 1.
    t/Apache2-TaintRequest.t .. Dubious, test returned 1 (wstat 256, 0x100)
    Failed 1/1 subtests 

    Test Summary Report
    -------------------
    t/Apache2-TaintRequest.t (Wstat: 256 Tests: 1 Failed: 1)
      Failed test:  1
      Non-zero exit status: 1
    Files=1, Tests=1,  0 wallclock secs ( 0.04 usr  0.01 sys +  0.04 cusr  0.01 csys =  0.10 CPU)
    Result: FAIL
    Failed 1/1 test programs. 1/1 subtests failed.
    make: *** [test_dynamic] Error 1
      PHRED/Apache2-TaintRequest-0.01.tar.gz
    one dependency not OK (Taint); additionally test harness failed
      /usr/bin/make test -- NOT OK
    //hint// to see the cpan-testers results for installing this module, try:
      reports PHRED/Apache2-TaintRequest-0.01.tar.gz
    Running make install
      make test had returned bad status, won't install without force

我很茫然,任何帮助将不胜感激。谢谢。

4

2 回答 2

2

您是否看到perlbrew设置了正确的标志并且可以正常工作?

于 2013-08-13T16:03:42.833 回答
0

首先强制安装 Taint 模块:

cpan[1]> force install Taint

然后:cpan Apache2::TaintRequest

于 2013-08-13T19:25:54.357 回答