刚开始与perl(试图让一个请求跟踪器安装工作):出于某种原因,我不能安装Cache :: Cache! (或者testing失败):注意:在CentOS 5.8 Final(x86_64,2.6.18-308.13.1.el5),Apache 2.2.23上的perl 5.8.8(我没有看到2.6.18-308的报告在cpan.org上,但某些版本的2.6.18-xyz失败(主要是alpha5或xend4版本是失败),但大多数情况下,
我已经尝试过与cpan,cpanm,我试图使用下午卸载来摆脱它,但它说,它不存在..
cpanm Cache::Cache --> Working on Cache::Cache Fetching http://www.cpan.org/authors/id/J/JS/JSWARTZ/Cache-Cache-1.06.tar.gz ... OK Configuring Cache-Cache-1.05 ... OK Building and testing Cache-Cache-1.06 ... FAIL ! Installing Cache::Cache failed. See /root/.cpanm/build.log for details.
所以我:
更多/root/.cpanm/build.log
输出的相关部分是(似乎是):
Manifying blib/man3/Cache::NullCache.3 PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/1_test_cache_interface.t ................. ok t/2_test_memory_cache.t .................... ok Error: Can't call method "set_size" on unblessed reference at /root/.cpanm/work/1354840722.23539/Cache-Cache-1.06/blib/lib/Cache/BaseCache.pm line 240. Can't call method "set_size" on unblessed reference at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 38. Error::_throw_Error_Simple('HASH(0x11e14db8)') called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 310 Error::subs::run_clauses('HASH(0x11e14d48)', 'Can\'t call method "set_size" on unblessed reference at /root...', undef, 'ARRAY(0x11efcbd8)') called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 430 Error::subs::try('CODE(0x11e14ba8)', 'HASH(0x11e14d48)') called at /root/.cpanm/work/1354840722.23539/Cache-Cache-1.06/blib/lib/Cache/CacheTester.pm line 59 Cache::CacheTester::test('Cache::CacheTester=HASH(0x11e14ae8)', 'Cache::FileCache=HASH(0x121d2ea8)') called at t/3_test_file_cache.t line 41 t/3_test_file_cache.t ...................... Failed 33/35 subtests Error: Can't call method "set_size" on unblessed reference at /root/.cpanm/work/1354840722.23539/Cache-Cache-1.06/blib/lib/Cache/BaseCache.pm line 240. Can't call method "set_size" on unblessed reference at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 38. Error::_throw_Error_Simple('HASH(0x15e77d8)') called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 310 Error::subs::run_clauses('HASH(0x15e7768)', 'Can\'t call method "set_size" on unblessed reference at /root...', undef, 'ARRAY(0x15a1bd8)') called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 43 0 Error::subs::try('CODE(0x15e74a8)', 'HASH(0x15e7768)') called at /root/.cpanm/work/1354840722.23539/Cache-Cache-1.06/blib/lib/Cache/CacheTester.pm line 59 Cache::CacheTester::test('Cache::CacheTester=HASH(0x15e7618)', 'Cache::SharedMemoryCache=HASH(0x15e6af8)') called at t/4_test_shared_memory_cache.t line 41 t/4_test_shared_memory_cache.t ............. Failed 33/35 subtests
然后它只是重复了一段时间…
这是来自/root/.cpanm/work/1354840722.23539/Cache-Cache-1.06/blib/lib/Cache/BaseCache.pm的240/241行
$object->set_size( $self->_get_backend( )-> get_size( $self->get_namespace( ), $p_key ) );
对不起,如果这似乎是一个全新的问题。 我已经从所有这些不同的错误中search了很多不同的string组合,就像以前从来没有人遇到过这个问题。 为了引导,我读了关于Cache :: Cache,它是如此坚实,它已经两年没有更新,是最常见的模块之一。
我需要这个模块,因为它是HTML :: Mason的依赖关系,它是Request Tracker 4.0.8的依赖项。 我已经安装了几乎所有的其他依赖(我已经尝试安装IPC :: ShareLite,成功,而'梅森',而不是)。 当然,我可以强制安装一些东西,但我真的不适合作为一个新手,只是去“强制”一切,因为我知道这不一定会奏效,这就是testing告诉我的。
其他模块,我可以看到我错过了,其中一些未能被安装上述,另外Plack不会安装:
PSGI missing dependencies: Plack ...MISSING HTML::Mason ...MISSING Can't locate HTML/Mason.pm in @INC HTML::Mason::PSGIHandler ...MISSING Can't locate HTML/Mason/PSGIHandler.pm in @INC Plack::Handler::Starlet ...MISSING
是否有一个原因,您在CentOS上从CPAN安装模块,而不是使用perl模块的CentOS存储库/ RPMs? 如果没有,那么您可以尝试使用EPEL存储库中的RPM: http : //fedoraproject.org/wiki/EPEL
EPEL中的CentOS 5版本为1.05: http : //mirrors.kernel.org/fedora-epel/5/x86_64/perl-Cache-Cache-1.05-1.el5.noarch.rpm 。 您可能会发现,通过在CentOS库或EPEL仓库中定位模块(如果它们没有为版本1.06明确调用),您可以更容易地满足依赖关系。
我知道这并不能解决为什么构build模块失败的实际问题。 但是至less可以成为安装Cache-Cache的替代scheme。 如果你最终要做RPM包路线,那么另一个好工具是http://perl.arix.com/cpan2rpm/ 。 我使用cpan2rpm为perl模块构build了RPM,这些模块在CentOS或EPEL仓库中不存在,并且在与系统安装的perl版本配合良好的情况下获得了很好的成功。