"Perl lib version vXX doesn't match executable version vXX" 问题解决

装idba的时候遇到一个小问题,执行“./build.sh”总是会报错:
/usr/bin/aclocal: Perl lib version (5.22.0) doesn’t match executable ‘/usr/bin/perl’ version (5.16.3) at /home/liumengjia/software/lib/perl5/5.22.0//x86_64-linux-thread-multi/Config.pm line 62.
Compilation failed in require at /home/liumengjia/software/lib/perl5/5.22.0//x86_64-linux-thread-multi/threads.pm line 13.
……….

就是我的库对不上我的它使用的perl版本么?
排错开始:

$perl -v

This is perl 5, version 22, subversion 0 (v5.22.0) built for x86_64-linux-thread-multi

Copyright 1987-2015, Larry Wall
....
$which perl
/public/software/bin/perl
$/public/software/bin/perl -v

This is perl 5, version 22, subversion 0 (v5.22.0) built for x86_64-linux-thread-multi

Copyright 1987-2015, Larry Wall
$/usr/bin/perl -v

This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 29 registered patches, see perl -V for more detail)

Copyright 1987-2012, Larry Wall

aclocal要找的/usr/bin/perl是5.16.3 ,而我自己的bin文件下还有一个perl,是5.22.0,这个perl对应到的库与5.16.3 不符,为了先安装成功,想把自己环境变量里的perl备份成perl_bak,source一下,果然还是不行

echo $PERL5LIB
/public/software/ViennaRNA-2.4.10/interfaces/Perl::/home/XXX/software/lib/perl5/5.22.0/:/home/XXX/software/lib/perl5/5.22.0/lib/perl5/:/home/XXX/software/lib/perl5/5.22.0/:/home/XXX/software/lib/perl5/5.22.0/lib/perl5/

找的库还是不对,干脆先清空

$PERL5LIB=''
$ echo $PERL5LIB

PERL5LIB我保存在bashrc里面的,要用的时候再去掉注释就可以了,结果当然是编译成功了

    原文作者:涤生生
    原文地址: https://www.jianshu.com/p/4c68570bb087
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞