无法在Linux上安装PAR :: Packer 1.014

时间:2013-09-15 12:01:05

标签: linux perl makefile cpan pp-perl-par-packager

安装CPAN模块时,PP(PAR :: Packer)总是失败。

如果我通过cpan安装它会失败。

cpan> cpan pp
CPAN: Storable loaded ok (v2.41)
Reading '/root/.cpan/Metadata'
  Database was generated on Sun, 15 Sep 2013 03:41:03 GMT
Running install for module 'pp'
Running make for R/RS/RSCHUPP/PAR-Packer-1.014.tar.gz
CPAN: Digest::SHA loaded ok (v5.84_01)
CPAN: Compress::Zlib loaded ok (v2.06)
Checksum for /root/.cpan/sources/authors/id/R/RS/RSCHUPP/PAR-Packer-1.014.tar.gz ok
CPAN: File::Temp loaded ok (v0.23)
CPAN: Parse::CPAN::Meta loaded ok (v1.4404)
CPAN: CPAN::Meta loaded ok (v2.120921)
CPAN: Module::CoreList loaded ok (v2.96)

PAN.pm: Building R/RS/RSCHUPP/PAR-Packer-1.014.tar.gz

*** You have extra Perl library paths set in your environment.
    Please note that these paths (set with PERL5LIB or PERLLIB)
    are not honored by perl when running under taint mode, which
    may lead to problems. This is a limitation (by design) of
    Perl, not of PAR::Packer; but some of the problems may
    manifest here during installation.
Checking if your kit is complete...
Looks good
Prototype mismatch: sub main::prompt: none vs ($;$) at /usr/local/lib/perl5/5.18.1/ExtUtils/MakeMaker.pm line 220.
Writing Makefile for par
Writing MYMETA.yml and MYMETA.json
Writing Makefile for PAR::Packer
Writing MYMETA.yml and MYMETA.json
cp lib/PAR/Filter/Bleach.pm blib/lib/PAR/Filter/Bleach.pm
cp lib/PAR/Filter.pm blib/lib/PAR/Filter.pm
cp lib/PAR/Filter/PodStrip.pm blib/lib/PAR/Filter/PodStrip.pm
cp lib/PAR/Filter/Obfuscate.pm blib/lib/PAR/Filter/Obfuscate.pm
cp lib/PAR/Filter/PatchContent.pm blib/lib/PAR/Filter/PatchContent.pm
cp lib/PAR/Packer.pm blib/lib/PAR/Packer.pm
cp lib/PAR/Filter/Bytecode.pm blib/lib/PAR/Filter/Bytecode.pm
cp lib/PAR/StrippedPARL/Base.pm blib/lib/PAR/StrippedPARL/Base.pm
cp lib/App/Packer/PAR.pm blib/lib/App/Packer/PAR.pm
cp lib/pp.pm blib/lib/pp.pm
make[1]: Entering directory `/root/.cpan/build/PAR-Packer-1.014-Cy_LGm/myldr'
Makefile:755: warning: overriding commands for target `.c.o'
Makefile:333: warning: ignoring old commands for target `.c.o'
/usr/local/bin/perl par_pl2c.pl my_par_pl < ../script/par.pl > my_par_pl.c 
/usr/local/bin/perl sha1.c.PL
cc -c -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.18.1/x86_64-linux/CORE  -DPARL_EXE=\"parl\" -O2 main.c
main.c: In function ‘main’:
main.c:121: warning: assignment discards qualifiers from pointer target type
cc main.o  -s -Wl,-E  -fstack-protector -L/usr/local/lib  -L/usr/local/lib/perl5/5.18.1/x86_64-linux/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lc  -o ./par

true
/usr/local/bin/perl encode_append.pl Dynamic.in ./par Dynamic.pm
/usr/local/bin/perl ./file2c.pl -c 30000 ./par /usr/local/lib/perl5/5.18.1/x86_64-linux/CORE/libperl.a > boot_embedded_files.c
cc -c -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.18.1/x86_64-linux/CORE  -DPARL_EXE=\"parl\" -O2 boot.c
cc boot.o -static-libgcc -s -Wl,-E  -fstack-protector -L/usr/local/lib  -L/usr/local/lib/perl5/5.18.1/x86_64-linux/CORE -lnsl -ldl -lm -lcrypt -lutil -lc   -o ./boot
true
/usr/local/bin/perl encode_append.pl Static.in ./boot Static.pm
cp Static.pm ../blib/lib/PAR/StrippedPARL/Static.pm
cp Dynamic.pm ../blib/lib/PAR/StrippedPARL/Dynamic.pm
/usr/local/bin/perl -Mblib run_with_inc.pl ./boot -q -B -Oparl
system(./boot -I/root/.cpan/build/PAR-Packer-1.014-Cy_LGm/myldr/../blib/arch -I/root/.cpan/build/PAR-Packer-1.014-Cy_LGm/myldr/../blib/lib -I/usr/local/lib/perl5/site_perl/5.18.1/x86_64-linux -I/usr/local/lib/perl5/site_perl/5.18.1 -I/usr/local/lib/perl5/5.18.1   /x86_64-linux -I/usr/local/lib/perl5/5.18.1 -I. -q -B -Oparl) failed: 
make[1]: *** [parl] Error 255
make[1]: Leaving directory `/root/.cpan/build/PAR-Packer-1.014-Cy_LGm/myldr'
make: *** [subdirs] Error 2
  RSCHUPP/PAR-Packer-1.014.tar.gz
  /usr/bin/make -- NOT OK
'YAML' not installed, will not store persistent state
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible

很好,我会手动安装。

# wget http://search.cpan.org/CPAN/authors/id/R/RS/RSCHUPP/PAR-Packer-1.014.tar.gz
# tar -xzf PAR-Packer-1.014.tar.gz
# cd PAR-Packer-1.014
# perl Makefile.PL
# make


Skip blib/lib/App/Packer/PAR.pm (unchanged)
Skip blib/lib/PAR/Filter/Bleach.pm (unchanged)
Skip blib/lib/pp.pm (unchanged)
Skip blib/lib/PAR/StrippedPARL/Base.pm (unchanged)
Skip blib/lib/PAR/Filter/PodStrip.pm (unchanged)
Skip blib/lib/PAR/Filter/Obfuscate.pm (unchanged)
Skip blib/lib/PAR/Packer.pm (unchanged)
Skip blib/lib/PAR/Filter/PatchContent.pm (unchanged)
Skip blib/lib/PAR/Filter/Bytecode.pm (unchanged)
Skip blib/lib/PAR/Filter.pm (unchanged)
make[1]: Entering directory `/root/PAR-Packer-1.013/myldr'
Makefile:765: warning: overriding commands for target `.c.o'
Makefile:341: warning: ignoring old commands for target `.c.o'
cc -c -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.18.1/x86_64-linux/CORE  -DPARL_EXE=\"parl\" -O2 main.c
cc main.o  -s -Wl,-E  -fstack-protector -L/usr/local/lib  -L/usr/local/lib/perl5/5.18.1/x86_64-linux/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lc -o ./par
true
/usr/local/bin/perl encode_append.pl Dynamic.in ./par Dynamic.pm
/usr/local/bin/perl ./file2c.pl -c 30000 ./par my_par.c load_my_par
cc -c -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.18.1/x86_64-linux/CORE  -DPARL_EXE=\"parl\" -O2 boot.c
cc boot.o -s -Wl,-E  -fstack-protector -L/usr/local/lib  -L/usr/local/lib/perl5/5.18.1/x86_64-linux/CORE -lnsl -ldl -lm -lcrypt -lutil -lc  -o ./boot
true
/usr/local/bin/perl encode_append.pl Static.in ./boot Static.pm
Skip ../blib/lib/PAR/StrippedPARL/Dynamic.pm (unchanged)
Skip ../blib/lib/PAR/StrippedPARL/Static.pm (unchanged)
/usr/local/bin/perl -Mblib run_with_inc.pl ./boot -q -B -Oparl
system(./boot -I/root/PAR-Packer-1.013/myldr/../blib/arch -I/root/PAR-Packer-1.013/myldr/../blib/lib -I/usr/local/lib/perl5/site_perl/5.18.1/x86_64-linux -I/usr/local/lib/perl5/site_perl/5.18.1 -I/usr/local/lib/perl5/5.18.1/x86_64-linux -I/usr/local/lib/perl5/5.18.1 -I. -q -B -Oparl) failed: 
make[1]: *** [parl] Error 255
make[1]: Leaving directory `/root/PAR-Packer-1.013/myldr'
make: *** [subdirs] Error 2

失败的结果。

# make install

没有更好,仍然失败。

make[1]: Entering directory `/root/PAR-Packer-1.013/myldr'
Makefile:757: warning: overriding commands for target `.c.o'
Makefile:333: warning: ignoring old commands for target `.c.o'
/usr/local/bin/perl -Mblib run_with_inc.pl ./boot -q -B -Oparl
system(./boot -I/root/PAR-Packer-1.013/myldr/../blib/arch -I/root/PAR-Packer-1.013/myldr/../blib/lib -I/usr/local/lib/perl5/site_perl/5.18.1/x86_64-linux -I/usr/local/lib/perl5/site_perl/5.18.1 -I/usr/local/lib/perl5/5.18.1/x86_64-linux -I/usr/local/lib/perl5/5.18.1 -I. -q -B -Oparl) failed: 
make[1]: *** [parl] Error 255
make[1]: Leaving directory `/root/PAR-Packer-1.013/myldr'
make: *** [subdirs] Error 2

如果我安装真正的旧版本,那么我可以安装它,但是脚本仍然无效。有没有人建议将脚本编译成二进制文件?

我找到的旧版本位于此处:http://www.filewatcher.com/m/p5-PAR-Packer-0.97.6.tbz.31-0.html

如果我手动安装,则会出现此错误。我已经尝试用大多数迄今为止的版本替换所有的StrippedPARL文件。没有解决它。

# pp -o test test.pl 
PAR::StrippedPARL::Static->get_raw() did not return the raw binary data for a PAR loader at PAR/StrippedPARL/Base.pm line 141, <DATA> line 1.
Could not write temporary parl (class PAR::StrippedPARL::Static) to file '/tmp/parl7iXv' at PAR/StrippedPARL/Base.pm line 65, <DATA> line 1.
/bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file '/tmp/parlV69KOmc' at PAR/Packer.pm line 1169, <DATA> line 1.

[root@server lib]# pp -p test.pl 
[root@server lib]# pp -o hello a.par 
PAR::StrippedPARL::Static->get_raw() did not return the raw binary data for a PAR loader at PAR/StrippedPARL/Base.pm line 141, <DATA> line 1.
Could not write temporary parl (class PAR::StrippedPARL::Static) to file '/tmp/parlH3l2' at PAR/StrippedPARL/Base.pm line 65, <DATA> line 1.
/bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file '/tmp/parlGJdI1MP' at PAR/Packer.pm line 1169, <DATA> line 1.

根据amons建议,我安装了旧版本的perl。

[root@server lib]# pp test.pl 
PAR::StrippedPARL::Static->get_raw() did not return the raw binary data for a PAR loader at PAR/StrippedPARL/Base.pm line 141, <DATA> line 1.
Could not write temporary parl (class PAR::StrippedPARL::Static) to file '/tmp/parlW2E0' at PAR/StrippedPARL/Base.pm line 65, <DATA> line 1.
/bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file '/tmp/parlK48HkV0' at PAR/Packer.pm line 1169, <DATA> line 1.
[root@server lib]# perl -v

This is perl, v5.10.1 (*) built for x86_64-linux

Copyright 1987-2009, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

无法取消设置perl5lib,它没有设置。

perl -e 'print "PERL5LIB: ", $ENV{PERL5LIB}, "\n";'
PERL5LIB: 

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题。至少在我的情况下,检查环境变量TMPDIR并检查是否可以从中执行二进制文件。在我的情况下,它是/ dev / shm并且禁止执行它(出于安全原因,我猜)。代码启动(从boot.c)将二进制文件解压缩到$ TMPDIR并尝试从它运行并静默失败(因为模块作者未能预料到它将失败)。如果是这种情况,解决方案是:

    TMPDIR=/tmp make
相关问题