为什么我的“版本(5.12.2)与可执行版本不匹配”与Perl的PAR?

前端之家收集整理的这篇文章主要介绍了为什么我的“版本(5.12.2)与可执行版本不匹配”与Perl的PAR?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我运行以下命令从我的Perl脚本创建一个可执行文件时:

pp -o process_target_mode_data Process_Target_Mode_Data.pl

我得到以下错误输出

Perl lib version (5.12.2) doesn't match executable version (v5.12.0) at /home/Neil/ActivePerl-5.12/lib/Config.pm line 50.

Compilation Failed in require at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
BEGIN Failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
Compilation Failed in require at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
BEGIN Failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
Compilation Failed in require at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
BEGIN Failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
Compilation Failed in require at -e line 459.

/home/Neil/ActivePerl-5.12/site/bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file 'parleNrP2Xi' at /home/Neil/ActivePerl-5.12/site/lib/PAR/Packer.pm line 1172,<DATA> line 1.

有人可以向我解释发生了什么以及如何解决这个问题?

信息brian d foy要求:

[bash-3.2][Neil@willy]$ which pp
/home/Neil/ActivePerl-5.12/site/bin/pp

[bash-3.2][Neil@willy]$  /home/Neil/ActivePerl-5.12/site/bin/pp -o process_target_mode_data Process_Target_Mode_Data.pl
Perl lib version (5.12.2) doesn't match executable version (v5.12.0) at /home/Neil/ActivePerl-5.12/lib/Config.pm line 50.
Compilation Failed in require at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
BEGIN Failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
Compilation Failed in require at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
BEGIN Failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
Compilation Failed in require at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
BEGIN Failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
Compilation Failed in require at -e line 459.
/home/Neil/ActivePerl-5.12/site/bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file 'parludZfldz' at /home/Neil/ActivePerl-5.12/site/lib/PAR/Packer.pm line 1172,line 1.
[bash-3.2][Neil@willy]$ 


[bash-3.2][Neil@willy]$ /home/Neil/ActivePerl-5.12/bin/cpan -l | grep PAR
PAR     1.002
PAR::Dist       0.47
PAR::Heavy      0.12
PAR::Filter     0.03
PAR::SetupTemp  1.002
PAR::SetupProgname      1.002
PAR::Packer     1.006
PAR::StrippedPARL::Dynamic      0.958
PAR::StrippedPARL::Static       0.958
PAR::StrippedPARL::Base 0.975
PAR::Filter::Bytecode   undef
PAR::Filter::Bleach     undef
PAR::Filter::Obfuscate  undef
PAR::Filter::PatchContent       undef
PAR::Filter::PodStrip   undef
App::Packer::PAR        0.91

解决方法

Perl lib version (5.12.2) doesn’t match executable version (v5.12.0)

Perl安装的某些部分与其他部分版本不同.更具体地说,如果你查看/home/Neil/ActivePerl-5.12/lib/Config.pm第50行,你会看到正在执行的Perl版本(即5.12.0)与版本的显式比较正在使用的Config.pm库(5.12.2).

如果执行ActivePerl 5.12.2的新安装(将所有组件升级到相同版本),则此错误应该消失.

猜你在找的Perl相关文章