无法加载'/Compress/Raw/Zlib/Zlib.so'

时间:2012-04-28 02:03:37

标签: perl

我正在尝试运行Variant效果预测器perl脚本(通过ensembl),我收到此错误:

Testing VEP script
ERROR: Testing VEP script failed with the following error
Can't load '/home/sahel/perl5/lib/perl5/x86_64-linux/auto/Compress/Raw/Zlib/Zlib.so' for module Compress::Raw::Zlib: /home/sahel/perl5/lib/perl5/x86_64-linux/auto/Compress/Raw/Zlib/Zlib.so: undefined symbol: PL_unitcheckav at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.
 at /home/sahel/perl5/lib/perl5/Compress/Zlib.pm line 11
Compilation failed in require at /home/sahel/perl5/lib/perl5/Compress/Zlib.pm line 11.
BEGIN failed--compilation aborted at /home/sahel/perl5/lib/perl5/Compress/Zlib.pm line 11.
Compilation failed in require at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/ProteinFunctionPredictionMatrix.pm line 73.
BEGIN failed--compilation aborted at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/ProteinFunctionPredictionMatrix.pm line 73.
Compilation failed in require at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/TranscriptVariationAllele.pm line 65.
BEGIN failed--compilation aborted at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/TranscriptVariationAllele.pm line 65.
Compilation failed in require at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/TranscriptVariation.pm line 57.
BEGIN failed--compilation aborted at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/TranscriptVariation.pm line 57.
Compilation failed in require at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/DBSQL/TranscriptVariationAdaptor.pm line 68.
BEGIN failed--compilation aborted at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/DBSQL/TranscriptVariationAdaptor.pm line 68.
Compilation failed in require at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/VariationFeature.pm line 105.
BEGIN failed--compilation aborted at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/VariationFeature.pm line 105.
Compilation failed in require at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/Utils/VEP.pm line 52.
BEGIN failed--compilation aborted at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/Utils/VEP.pm line 52.
Compilation failed in require at variant_effect_predictor.pl line 57.
BEGIN failed--compilation aborted at variant_effect_predictor.pl line 57.

我已经通过cpan安装了所有必需的模块,并通过以下方式设置模块的路径:

echo 'eval `/projects/sahel_proj/localperl/bin/perl -I ~/perl5/lib/perl5 -Mlocal::lib`' >> ~/.profile

压缩:: Raw :: Zlib和Compress :: Zlib似乎已成功安装:

./bin/perl -e 'use Compress::Raw::Zlib;'
./bin/perl -e 'use Compress::Zlib;'

所以我想不出什么可能是错的,在网上找不到任何东西......

这是我第一次与perl合作的经历:(任何帮助都会受到赞赏......

非常感谢

1 个答案:

答案 0 :(得分:2)

似乎有一个Perl版本不匹配。标志指出:您正在加载的.so是使用一个版本的Perl构建的,它是由不兼容的Perl版本加载的。

我怀疑您的测试是使用一个perl(用于安装模块的那个)完成的,而实际的程序是使用另一个perl运行的。

现在你知道为什么我无法理解为什么人们认为INSTALL_BASE又名--install_base是个好主意。当然,目录结构更漂亮,但它会导致这些问题!您正在通过local :: lib使用INSTALL_BASE又名--install_base(一种告诉Makefile.PLBuild.PL安装模块的方法)。

解决方案1。

使用您用于安装模块的perl运行脚本。

解决方案2.

摆脱local :: lib安装模块的目录,并重新安装它们而不使用local :: lib:

perl Makefile.PL PREFIX=~ LIB=~/lib/perl5
make
make test
make install

perl Build.PL --prefix ~ --lib ~/lib/perl5
./Build
./Build test
./Build install

如果您同时使用perl执行上述操作,则perl可以使用特定于版本的模块。如果仅使用一个perl执行上述操作,则只有perl版本才能使用特定于版本的模块。没有冲突。

(您可以使用cpan将其配置为使用上述命令。)

不要忘记告诉perl在哪里找到你的模块。在您的登录脚本中,

export PERL5LIB=~/lib/perl5