perl linux 独立运行,Perl脚本打包为独立执行程序

Linux平台打包Perl脚本为独立运行程序

一、安装打包工具

安装注意事项:

1)尽量选择与这个Perl版本兼容的相关Perl模块;

2)由于PAR-Packer-1.013对perl版本需求决定,必须卸载系统中不兼容的perl版本及所有Perl开头相关包,源码编译安装perl-5.10.1.tar.gz,下载网址:http://www.cpan.org/src/5.0/perl-5.10.1.tar.gz

安装步骤如下:

tar zxvf perl-5.10.1.tar.gz

cd perl-5.10.1

sh Configure -de

make

make test

make install

[root@test test]# 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.

1.安装Archive-Zip-1.29.tar.gz

[root@test software]# tar zxvf Archive-Zip-1.29.tar.gz

Archive-Zip-1.29/

Archive-Zip-1.29/META.yml

Archive-Zip-1.29/LICENSE

Archive-Zip-1.29/Makefile.PL

Archive-Zip-1.29/README

Archive-Zip-1.29/script/

Archive-Zip-1.29/script/crc32

Archive-Zip-1.29/MANIFEST

Archive-Zip-1.29/examples/

Archive-Zip-1.29/examples/writeScalar2.pl

Archive-Zip-1.29/examples/mailZip.pl

Archive-Zip-1.29/examples/ziptest.pl

Archive-Zip-1.29/examples/zipinfo.pl

Archive-Zip-1.29/examples/selfex.pl

Archive-Zip-1.29/examples/writeScalar.pl

Archive-Zip-1.29/examples/updateTree.pl

Archive-Zip-1.29/examples/zipcheck.pl

Archive-Zip-1.29/examples/ziprecent.pl

Archive-Zip-1.29/examples/calcSizes.pl

Archive-Zip-1.29/examples/zipGrep.pl

Archive-Zip-1.29/examples/zip.pl

Archive-Zip-1.29/examples/copy.pl

Archive-Zip-1.29/examples/readScalar.pl

Archive-Zip-1.29/examples/extract.pl

Archive-Zip-1.29/examples/unzipAll.pl

Archive-Zip-1.29/examples/updateZip.pl

Archive-Zip-1.29/examples/mfh.pl

Archive-Zip-1.29/Changes

Archive-Zip-1.29/lib/

Archive-Zip-1.29/lib/Archive/

Archive-Zip-1.29/lib/Archive/Zip.pm

Archive-Zip-1.29/lib/Archive/Zip/

Archive-Zip-1.29/lib/Archive/Zip/FAQ.pod

Archive-Zip-1.29/lib/Archive/Zip/Tree.pm

Archive-Zip-1.29/lib/Archive/Zip/MockFileHandle.pm

Archive-Zip-1.29/lib/Archive/Zip/MemberRead.pm

Archive-Zip-1.29/lib/Archive/Zip/DirectoryMember.pm

Archive-Zip-1.29/lib/Archive/Zip/NewFileMember.pm

Archive-Zip-1.29/lib/Archive/Zip/BufferedFileHandle.pm

Archive-Zip-1.29/lib/Archive/Zip/ZipFileMember.pm

Archive-Zip-1.29/lib/Archive/Zip/Archive.pm

Archive-Zip-1.29/lib/Archive/Zip/Member.pm

Archive-Zip-1.29/lib/Archive/Zip/StringMember.pm

Archive-Zip-1.29/lib/Archive/Zip/FileMember.pm

Archive-Zip-1.29/t/

Archive-Zip-1.29/t/common.pl

Archive-Zip-1.29/t/09_output_record_sep.t

Archive-Zip-1.29/t/06_update.t

Archive-Zip-1.29/t/02_main.t

Archive-Zip-1.29/t/08_readmember_record_sep.t

Archive-Zip-1.29/t/07_filenames_of_0.t

Archive-Zip-1.29/t/97_meta.t

Archive-Zip-1.29/t/01_compile.t

Archive-Zip-1.29/t/11_explorer.t

Archive-Zip-1.29/t/98_pod.t

Archive-Zip-1.29/t/10_chmod.t

Archive-Zip-1.29/t/05_tree.t

Archive-Zip-1.29/t/data/

Archive-Zip-1.29/t/data/perl.zip

Archive-Zip-1.29/t/data/chmod.zip

Archive-Zip-1.29/t/data/linux.zip

Archive-Zip-1.29/t/data/winzip.zip

Archive-Zip-1.29/t/12_bug_47223.t

Archive-Zip-1.29/t/99_pmv.t

Archive-Zip-1.29/t/badjpeg/

Archive-Zip-1.29/t/badjpeg/source.zip

Archive-Zip-1.29/t/badjpeg/expected.jpg

Archive-Zip-1.29/t/03_ex.t

Archive-Zip-1.29/t/04_readmember.t

[root@test software]# cd Archive-Zip-1.29

[root@test Archive-Zip-1.29]# perl Makefile.PL

Checking if your kit is complete...

Looks good

Writing Makefile for Archive::Zip

[root@test Archive-Zip-1.29]# make

cp lib/Archive/Zip/MemberRead.pm blib/lib/Archive/Zip/MemberRead.pm

cp lib/Archive/Zip/FileMember.pm blib/lib/Archive/Zip/FileMember.pm

cp lib/Archive/Zip/MockFileHandle.pm blib/lib/Archive/Zip/MockFileHandle.pm

cp lib/Archive/Zip/BufferedFileHandle.pm blib/lib/Archive/Zip/BufferedFileHandle.pm

cp lib/Archive/Zip/StringMember.pm blib/lib/Archive/Zip/StringMember.pm

cp lib/Archive/Zip/Tree.pm blib/lib/Archive/Zip/Tree.pm

cp lib/Archive/Zip/Member.pm blib/lib/Archive/Zip/Member.pm

cp lib/Archive/Zip/FAQ.pod blib/lib/Archive/Zip/FAQ.pod

cp lib/Archive/Zip.pm blib/lib/Archive/Zip.pm

cp lib/Archive/Zip/Archive.pm blib/lib/Archive/Zip/Archive.pm

cp lib/Archive/Zip/ZipFileMember.pm blib/lib/Archive/Zip/ZipFileMember.pm

cp lib/Archive/Zip/NewFileMember.pm blib/lib/Archive/Zip/NewFileMember.pm

cp lib/Archive/Zip/DirectoryMember.pm blib/lib/Archive/Zip/DirectoryMember.pm

cp script/crc32 blib/script/crc32

/usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/crc32

Manifying blib/man3/Archive::Zip::Tree.3

Manifying blib/man3/Archive::Zip::FAQ.3

Manifying blib/man3/Archive::Zip.3

Manifying blib/man3/Archive::Zip::MemberRead.3

[root@test Archive-Zip-1.29]# make test

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t

t/01_compile.t ................ ok

t/02_main.t ................... ok

t/03_ex.t ..................... ok

t/04_readmember.t ............. ok

t/05_tree.t ................... ok

t/06_update.t ................. ok

t/07_filenames_of_0.t ......... ok

t/08_readmember_record_sep.t .. ok

t/09_output_record_sep.t ...... ok

t/10_chmod.t .................. ok

t/11_explorer.t ............... ok

t/12_bug_47223.t .............. skipped: Only required on Win32.

t/97_meta.t ................... skipped: Author tests not required for installation

t/98_pod.t .................... skipped: Author tests not required for installation

t/99_pmv.t .................... skipped: Author tests not required for installation

All tests successful.

Files=15, Tests=211,  9 wallclock secs ( 0.23 usr  0.14 sys +  2.85 cusr  1.46 csys =  4.68 CPU)

Result: PASS[root@test Archive-Zip-1.29]# make install

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip/NewFileMember.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip/MemberRead.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip/FileMember.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip/Member.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip/Tree.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip/FAQ.pod

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip/StringMember.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip/BufferedFileHandle.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip/ZipFileMember.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip/Archive.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip/MockFileHandle.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Archive/Zip/DirectoryMember.pm

Installing /usr/local/share/man/man3/Archive::Zip.3

Installing /usr/local/share/man/man3/Archive::Zip::FAQ.3

Installing /usr/local/share/man/man3/Archive::Zip::Tree.3

Installing /usr/local/share/man/man3/Archive::Zip::MemberRead.3

Installing /usr/local/bin/crc32

Appending installation info to /usr/local/lib/perl5/5.10.1/x86_64-linux/perllocal.pod

[root@test Archive-Zip-1.29]#

2.安装Getopt-ArgvFile-1.07.tgz

[root@test software]# tar zxvf Getopt-ArgvFile-1.07.tgz

Getopt-ArgvFile-1.07/

Getopt-ArgvFile-1.07/ArgvFile.pm

Getopt-ArgvFile-1.07/Makefile.PL

Getopt-ArgvFile-1.07/MANIFEST

Getopt-ArgvFile-1.07/README

Getopt-ArgvFile-1.07/t/

Getopt-ArgvFile-1.07/t/prefix.t

Getopt-ArgvFile-1.07/t/case.cfg

Getopt-ArgvFile-1.07/t/base.t

Getopt-ArgvFile-1.07/t/.base.t

Getopt-ArgvFile-1.07/t/.prefix.t

Getopt-ArgvFile-1.07/t/.base.t.cfg

Getopt-ArgvFile-1.07/t/use.t

Getopt-ArgvFile-1.07/t/noHOMEvar.t

[root@test software]# cd Getopt-ArgvFile-1.07

[root@test Getopt-ArgvFile-1.07]# perl Makefile.PL

Checking if your kit is complete...

Looks good

Writing Makefile for Getopt::ArgvFile

[root@test Getopt-ArgvFile-1.07]# make

cp ArgvFile.pm blib/lib/Getopt/ArgvFile.pm

Manifying blib/man3/Getopt::ArgvFile.3

[root@test Getopt-ArgvFile-1.07]# make test

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t

t/base.t ....... ok

t/noHOMEvar.t .. ok

t/prefix.t ..... ok

t/use.t ........ ok

All tests successful.

Files=4, Tests=9,  0 wallclock secs ( 0.04 usr  0.02 sys +  0.16 cusr  0.06 csys =  0.28 CPU)

Result: PASS

[root@test Getopt-ArgvFile-1.07]# make install

Installing /usr/local/lib/perl5/site_perl/5.10.1/Getopt/ArgvFile.pm

Installing /usr/local/share/man/man3/Getopt::ArgvFile.3

Appending installation info to /usr/local/lib/perl5/5.10.1/x86_64-linux/perllocal.pod

[root@test Getopt-ArgvFile-1.07]#

3.安装Module-ScanDeps-1.09.tar.gz

[root@test software]# tar zxvf Module-ScanDeps-1.09.tar.gz

Module-ScanDeps-1.09/

Module-ScanDeps-1.09/inc/

Module-ScanDeps-1.09/inc/Module/

Module-ScanDeps-1.09/inc/Module/Install.pm

Module-ScanDeps-1.09/inc/Module/Install/

Module-ScanDeps-1.09/inc/Module/Install/Scripts.pm

Module-ScanDeps-1.09/inc/Module/Install/Win32.pm

Module-ScanDeps-1.09/inc/Module/Install/Makefile.pm

Module-ScanDeps-1.09/inc/Module/Install/WriteAll.pm

Module-ScanDeps-1.09/inc/Module/Install/Fetch.pm

Module-ScanDeps-1.09/inc/Module/Install/Metadata.pm

Module-ScanDeps-1.09/inc/Module/Install/Can.pm

Module-ScanDeps-1.09/inc/Module/Install/Base.pm

Module-ScanDeps-1.09/script/

Module-ScanDeps-1.09/script/scandeps.pl

Module-ScanDeps-1.09/t/

Module-ScanDeps-1.09/t/6-file-glob.t

Module-ScanDeps-1.09/t/4-static_functional_interface_options_fake.t

Module-ScanDeps-1.09/t/5-pluggable_fake.t

Module-ScanDeps-1.09/t/1-static_functional_interface_real.t

Module-ScanDeps-1.09/t/17-private_methods.t

Module-ScanDeps-1.09/t/0-pod.t

Module-ScanDeps-1.09/t/16-scan_line.t

Module-ScanDeps-1.09/t/10-case-insensitive-keys.t

Module-ScanDeps-1.09/t/12-ScanFileRE.t

Module-ScanDeps-1.09/t/7-check-dynaloader.t

Module-ScanDeps-1.09/t/2-static_functional_interface_fake.t

Module-ScanDeps-1.09/t/data/

Module-ScanDeps-1.09/t/data/file-glob-no.pl

Module-ScanDeps-1.09/t/data/file-glob-yes.pl

Module-ScanDeps-1.09/t/data/duplicated_entries/

Module-ScanDeps-1.09/t/data/duplicated_entries/Scoped/

Module-ScanDeps-1.09/t/data/duplicated_entries/Scoped/Package.pm

Module-ScanDeps-1.09/t/data/duplicated_entries/use_scoped_package.pl

Module-ScanDeps-1.09/t/data/static/

Module-ScanDeps-1.09/t/data/static/Duplicated.pm

Module-ScanDeps-1.09/t/data/static/useVERSION.pm

Module-ScanDeps-1.09/t/data/static/TestD.pm

Module-ScanDeps-1.09/t/data/static/inner_diamond_W.pm

Module-ScanDeps-1.09/t/data/static/null.pl

Module-ScanDeps-1.09/t/data/static/chicken.pm

Module-ScanDeps-1.09/t/data/static/Duplicator.pl

Module-ScanDeps-1.09/t/data/static/inner_diamond_S.pm

Module-ScanDeps-1.09/t/data/static/InputA.pl

Module-ScanDeps-1.09/t/data/static/outer_diamond_E.pm

Module-ScanDeps-1.09/t/data/static/outer_diamond_W.pm

Module-ScanDeps-1.09/t/data/static/TestA.pm

Module-ScanDeps-1.09/t/data/static/inner_diamond_E.pm

Module-ScanDeps-1.09/t/data/static/TestC.pm

Module-ScanDeps-1.09/t/data/static/TestB.pm

Module-ScanDeps-1.09/t/data/static/outer_diamond_N.pm

Module-ScanDeps-1.09/t/data/static/egg.pm

Module-ScanDeps-1.09/t/data/static/InputC.pl

Module-ScanDeps-1.09/t/data/static/inner_diamond_N.pm

Module-ScanDeps-1.09/t/data/static/outer_diamond_S.pm

Module-ScanDeps-1.09/t/data/static/InputB.pl

Module-ScanDeps-1.09/t/data/ScanFileRE/

Module-ScanDeps-1.09/t/data/ScanFileRE/example_too.pm

Module-ScanDeps-1.09/t/data/ScanFileRE/example.pm

Module-ScanDeps-1.09/t/data/ScanFileRE/auto/

Module-ScanDeps-1.09/t/data/ScanFileRE/auto/example/

Module-ScanDeps-1.09/t/data/ScanFileRE/auto/example/example.h

Module-ScanDeps-1.09/t/data/use_lib.pl

Module-ScanDeps-1.09/t/data/pluggable/

Module-ScanDeps-1.09/t/data/pluggable/Foo.pm

Module-ScanDeps-1.09/t/data/pluggable/Foo/

Module-ScanDeps-1.09/t/data/pluggable/Foo/Plugin/

Module-ScanDeps-1.09/t/data/pluggable/Foo/Plugin/Bar.pm

Module-ScanDeps-1.09/t/data/pluggable/Foo/Plugin/Baz.pm

Module-ScanDeps-1.09/t/data/case-insensitive-keys/

Module-ScanDeps-1.09/t/data/case-insensitive-keys/this_case.pl

Module-ScanDeps-1.09/t/data/case-insensitive-keys/Test.pm

Module-ScanDeps-1.09/t/data/case-insensitive-keys/that_case.pl

Module-ScanDeps-1.09/t/data/case-insensitive-keys/Test2.pm

Module-ScanDeps-1.09/t/data/check_path_to_inc_name/

Module-ScanDeps-1.09/t/data/check_path_to_inc_name/Scoped/

Module-ScanDeps-1.09/t/data/check_path_to_inc_name/Scoped/Package.pm

Module-ScanDeps-1.09/t/data/check_path_to_inc_name/Some.pm

Module-ScanDeps-1.09/t/data/check_path_to_inc_name/use_scoped_package.pl

Module-ScanDeps-1.09/t/Utils.pm

Module-ScanDeps-1.09/t/14-scan_chunk.t

Module-ScanDeps-1.09/t/9-check_path_to_inc_name.t

Module-ScanDeps-1.09/t/8-check_duplicated_entries.t

Module-ScanDeps-1.09/t/14-static_functional_cached.t

Module-ScanDeps-1.09/t/13-static_prefork_test.t

Module-ScanDeps-1.09/t/3-static_oo_interface_real.t

Module-ScanDeps-1.09/Makefile.PL

Module-ScanDeps-1.09/META.json

Module-ScanDeps-1.09/lib/

Module-ScanDeps-1.09/lib/Module/

Module-ScanDeps-1.09/lib/Module/ScanDeps/

Module-ScanDeps-1.09/lib/Module/ScanDeps/Cache.pm

Module-ScanDeps-1.09/lib/Module/ScanDeps/DataFeed.pm

Module-ScanDeps-1.09/lib/Module/ScanDeps.pm

Module-ScanDeps-1.09/Changes

Module-ScanDeps-1.09/MANIFEST

Module-ScanDeps-1.09/README

Module-ScanDeps-1.09/AUTHORS

Module-ScanDeps-1.09/META.yml

[root@test software]# cd Module-ScanDeps-1.09

[root@test Module-ScanDeps-1.09]# perl Makefile.PL

Checking if your kit is complete...

Looks good

Writing Makefile for Module::ScanDeps

[root@test Module-ScanDeps-1.09]# make

cp lib/Module/ScanDeps/Cache.pm blib/lib/Module/ScanDeps/Cache.pm

cp lib/Module/ScanDeps/DataFeed.pm blib/lib/Module/ScanDeps/DataFeed.pm

cp lib/Module/ScanDeps.pm blib/lib/Module/ScanDeps.pm

cp script/scandeps.pl blib/script/scandeps.pl

/usr/bin/perl "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/scandeps.pl

Manifying blib/man1/scandeps.pl.1

Manifying blib/man3/Module::ScanDeps.3

[root@test Module-ScanDeps-1.09]# make test

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t

t/0-pod.t ....................................... skipped: Test::Pod 1.00 required for testing POD

t/1-static_functional_interface_real.t .......... ok

t/10-case-insensitive-keys.t .................... skipped: Test irrelevant on case intolerant systems

t/12-ScanFileRE.t ............................... ok

t/13-static_prefork_test.t ...................... skipped: This test requires prefork.pm which is not installed. Skipping.

t/14-scan_chunk.t ............................... ok

t/14-static_functional_cached.t ................. 1/? 0

Couldn't retrieve data from file deps_cache.dat. Building new cache.

t/14-static_functional_cached.t ................. ok

t/16-scan_line.t ................................ ok

t/17-private_methods.t .......................... ok

t/2-static_functional_interface_fake.t .......... ok

t/3-static_oo_interface_real.t .................. ok

t/4-static_functional_interface_options_fake.t .. ok

t/5-pluggable_fake.t ............................ ok

t/6-file-glob.t ................................. ok

t/7-check-dynaloader.t .......................... # dynamic modules used for test: Cwd File::Glob Data::Dumper List::Util Time::HiRes Compress::Raw::Zlib

t/7-check-dynaloader.t .......................... 1/36 /tmp/2Ut1xsSWwO syntax OK

/tmp/rcU0jjBOLS syntax OK

/tmp/mp0HTi3KFa syntax OK

/tmp/EDSSDzmJU9 syntax OK

t/7-check-dynaloader.t .......................... 21/36 /tmp/dHd8Jgno2n syntax OK

/tmp/NKyoxJBgZn syntax OK

t/7-check-dynaloader.t .......................... ok

t/8-check_duplicated_entries.t .................. ok

t/9-check_path_to_inc_name.t .................... ok

All tests successful.

Files=17, Tests=18553, 23 wallclock secs ( 3.05 usr  0.36 sys + 13.95 cusr  2.71 csys = 20.07 CPU)

Result: PASS

[root@test Module-ScanDeps-1.09]# make install

Installing /usr/local/lib/perl5/site_perl/5.10.1/Module/ScanDeps.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Module/ScanDeps/Cache.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/Module/ScanDeps/DataFeed.pm

Installing /usr/local/share/man/man1/scandeps.pl.1

Installing /usr/local/share/man/man3/Module::ScanDeps.3

Installing /usr/local/bin/scandeps.pl

Appending installation info to /usr/local/lib/perl5/5.10.1/x86_64-linux/perllocal.pod

[root@test Module-ScanDeps-1.09]#

4.安装PAR-Dist-0.48.tar.gz

[root@test software]# tar zxvf PAR-Dist-0.48.tar.gz

PAR-Dist-0.48/

PAR-Dist-0.48/Changes

PAR-Dist-0.48/Makefile.PL

PAR-Dist-0.48/META.json

PAR-Dist-0.48/t/

PAR-Dist-0.48/t/data/

PAR-Dist-0.48/t/data/dist2.par

PAR-Dist-0.48/t/data/dist1.par

PAR-Dist-0.48/t/02parsedistname.t

PAR-Dist-0.48/t/01basic.t

PAR-Dist-0.48/t/00podcover.t

PAR-Dist-0.48/t/00pod.t

PAR-Dist-0.48/t/03merge_meta.t

PAR-Dist-0.48/MANIFEST

PAR-Dist-0.48/README

PAR-Dist-0.48/META.yml

PAR-Dist-0.48/lib/

PAR-Dist-0.48/lib/PAR/

PAR-Dist-0.48/lib/PAR/Dist.pm

[root@test software]# cd PAR-Dist-0.48

[root@test PAR-Dist-0.48]# perl Makefile.PL

Checking if your kit is complete...

Looks good

Writing Makefile for PAR::Dist

[root@test PAR-Dist-0.48]# make

cp lib/PAR/Dist.pm blib/lib/PAR/Dist.pm

Manifying blib/man3/PAR::Dist.3

[root@test PAR-Dist-0.48]# make test

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t

t/00pod.t ............ skipped: Set environment variable PERL_TEST_POD=1 to test POD

t/00podcover.t ....... skipped: Set environment variable PERL_TEST_POD=1 to test POD

t/01basic.t .......... ok

t/02parsedistname.t .. ok

t/03merge_meta.t ..... PAR::Dist testers/debug info: Using 'Parse::CPAN::Meta' as YAML implementation at /home/software/PAR-Dist-0.48/blib/lib/PAR/Dist.pm line 1357.

No YAML support for Dump found.

No YAML support for DumpFile found.

Using Archive::Zip as ZIP tool.

t/03merge_meta.t ..... skipped: Skip because no YAML loader/dumper could be found

All tests successful.

Files=5, Tests=7,  0 wallclock secs ( 0.04 usr  0.03 sys +  0.23 cusr  0.10 csys =  0.40 CPU)

Result: PASS[root@test PAR-Dist-0.48]# make install

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/Dist.pm

Installing /usr/local/share/man/man3/PAR::Dist.3

Appending installation info to /usr/local/lib/perl5/5.10.1/x86_64-linux/perllocal.pod

[root@test PAR-Dist-0.48]#

5.安装PAR-1.005.tar.gz

[root@test software]# tar zxvf PAR-1.005.tar.gz

PAR-1.005/

PAR-1.005/inc/

PAR-1.005/inc/Test/

PAR-1.005/inc/Test/Builder.pm

PAR-1.005/inc/Test/Builder/

PAR-1.005/inc/Test/Builder/Module.pm

PAR-1.005/inc/Test/More.pm

PAR-1.005/inc/PerlIO.pm

PAR-1.005/inc/Module/

PAR-1.005/inc/Module/Install.pm

PAR-1.005/inc/Module/Install/

PAR-1.005/inc/Module/Install/Include.pm

PAR-1.005/inc/Module/Install/Makefile.pm

PAR-1.005/inc/Module/Install/Metadata.pm

PAR-1.005/inc/Module/Install/WriteAll.pm

PAR-1.005/inc/Module/Install/Win32.pm

PAR-1.005/inc/Module/Install/Fetch.pm

PAR-1.005/inc/Module/Install/Base.pm

PAR-1.005/inc/Module/Install/Can.pm

PAR-1.005/inc/parent.pm

PAR-1.005/lib/

PAR-1.005/lib/PAR.pm

PAR-1.005/lib/PAR/

PAR-1.005/lib/PAR/FAQ.pod

PAR-1.005/lib/PAR/Heavy.pm

PAR-1.005/lib/PAR/SetupProgname.pm

PAR-1.005/lib/PAR/SetupTemp.pm

PAR-1.005/lib/PAR/Environment.pod

PAR-1.005/lib/PAR/Tutorial.pod

PAR-1.005/MANIFEST

PAR-1.005/TODO

PAR-1.005/t/

PAR-1.005/t/hello.par

PAR-1.005/t/40-par-hashref.t

PAR-1.005/t/60-cleanup.t

PAR-1.005/t/00-pod.t

PAR-1.005/t/Hello.pm

PAR-1.005/t/01-basic.t

PAR-1.005/t/50-autoloaderfix.t

PAR-1.005/META.yml

PAR-1.005/ChangeLog

PAR-1.005/MANIFEST.SKIP

PAR-1.005/AUTHORS

PAR-1.005/Makefile.PL

PAR-1.005/README

[root@test software]# cd PAR-1.005

[root@test PAR-1.005]# perl Makefile.PL

Checking if your kit is complete...

Looks good

Writing Makefile for PAR

[root@test PAR-1.005]# make

cp lib/PAR/FAQ.pod blib/lib/PAR/FAQ.pod

cp lib/PAR/Tutorial.pod blib/lib/PAR/Tutorial.pod

cp lib/PAR/Environment.pod blib/lib/PAR/Environment.pod

cp lib/PAR/Heavy.pm blib/lib/PAR/Heavy.pm

cp lib/PAR.pm blib/lib/PAR.pm

cp lib/PAR/SetupProgname.pm blib/lib/PAR/SetupProgname.pm

cp lib/PAR/SetupTemp.pm blib/lib/PAR/SetupTemp.pm

Manifying blib/man3/PAR::Tutorial.3

Manifying blib/man3/PAR::FAQ.3

Manifying blib/man3/PAR::Environment.3

Manifying blib/man3/PAR::Heavy.3

Manifying blib/man3/PAR.3

Manifying blib/man3/PAR::SetupProgname.3

Manifying blib/man3/PAR::SetupTemp.3

[root@test PAR-1.005]# make test

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t

t/00-pod.t ............ skipped: Set environment variable PERL_TEST_POD=1 to test POD

t/01-basic.t .......... ok

t/40-par-hashref.t .... ok

t/50-autoloaderfix.t .. ok

t/60-cleanup.t ........ ok

All tests successful.

Files=5, Tests=21,  2 wallclock secs ( 0.06 usr  0.02 sys +  0.86 cusr  0.31 csys =  1.25 CPU)

Result: PASS[root@test PAR-1.005]# make install

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/SetupTemp.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/Environment.pod

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/SetupProgname.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/Heavy.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/FAQ.pod

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/Tutorial.pod

Installing /usr/local/share/man/man3/PAR::FAQ.3

Installing /usr/local/share/man/man3/PAR::SetupProgname.3

Installing /usr/local/share/man/man3/PAR::SetupTemp.3

Installing /usr/local/share/man/man3/PAR::Heavy.3

Installing /usr/local/share/man/man3/PAR::Tutorial.3

Installing /usr/local/share/man/man3/PAR::Environment.3

Installing /usr/local/share/man/man3/PAR.3

Appending installation info to /usr/local/lib/perl5/5.10.1/x86_64-linux/perllocal.pod

[root@test PAR-1.005]#

6.安装PAR-Packer-1.013.tar.gz

[root@test software]# tar zxvf PAR-Packer-1.013.tar.gz

PAR-Packer-1.013/

PAR-Packer-1.013/myldr/

PAR-Packer-1.013/myldr/run_with_inc.pl

PAR-Packer-1.013/myldr/encode_append.pl

PAR-Packer-1.013/myldr/Dynamic.in

PAR-Packer-1.013/myldr/sha1.c.PL

PAR-Packer-1.013/myldr/boot.c

PAR-Packer-1.013/myldr/winres/

PAR-Packer-1.013/myldr/winres/pp.ico

PAR-Packer-1.013/myldr/winres/pp.rc

PAR-Packer-1.013/myldr/winres/pp.manifest

PAR-Packer-1.013/myldr/Makefile.PL

PAR-Packer-1.013/myldr/env.c

PAR-Packer-1.013/myldr/internals.c

PAR-Packer-1.013/myldr/main.c

PAR-Packer-1.013/myldr/file2c.pl

PAR-Packer-1.013/myldr/usernamefrompwuid.c

PAR-Packer-1.013/myldr/mktmpdir.h

PAR-Packer-1.013/myldr/utils.c

PAR-Packer-1.013/myldr/mktmpdir.c

PAR-Packer-1.013/myldr/Static.in

PAR-Packer-1.013/MANIFEST.SKIP

PAR-Packer-1.013/contrib/

PAR-Packer-1.013/contrib/stdio/

PAR-Packer-1.013/contrib/stdio/Stdio_readme.txt

PAR-Packer-1.013/contrib/stdio/Stdio.pm

PAR-Packer-1.013/contrib/gui_pp/

PAR-Packer-1.013/contrib/gui_pp/gpp_readme.txt

PAR-Packer-1.013/contrib/gui_pp/gpp

PAR-Packer-1.013/contrib/pare/

PAR-Packer-1.013/contrib/pare/pare_readme.txt

PAR-Packer-1.013/contrib/pare/pare

PAR-Packer-1.013/contrib/procedural_pp/

PAR-Packer-1.013/contrib/procedural_pp/pp_old

PAR-Packer-1.013/contrib/automated_pp_test/

PAR-Packer-1.013/contrib/automated_pp_test/automated_pp_test.pl

PAR-Packer-1.013/contrib/automated_pp_test/hello_tk.pl

PAR-Packer-1.013/contrib/automated_pp_test/hi.ico

PAR-Packer-1.013/contrib/automated_pp_test/pipe_a_command.pm

PAR-Packer-1.013/contrib/automated_pp_test/prior_to_test.pm

PAR-Packer-1.013/contrib/automated_pp_test/remove_file_and_try_executable_again.pm

PAR-Packer-1.013/contrib/automated_pp_test/test_in_further_subdir.pm

PAR-Packer-1.013/contrib/extract_embedded/

PAR-Packer-1.013/contrib/extract_embedded/extract-embedded.pl

PAR-Packer-1.013/contrib/docs/

PAR-Packer-1.013/contrib/docs/where_is_it.txt

PAR-Packer-1.013/contrib/docs/who_am_i.txt

PAR-Packer-1.013/inc/

PAR-Packer-1.013/inc/Module/

PAR-Packer-1.013/inc/Module/Install.pm

PAR-Packer-1.013/inc/Module/Install/

PAR-Packer-1.013/inc/Module/Install/Win32.pm

PAR-Packer-1.013/inc/Module/Install/Makefile.pm

PAR-Packer-1.013/inc/Module/Install/WriteAll.pm

PAR-Packer-1.013/inc/Module/Install/PAR.pm

PAR-Packer-1.013/inc/Module/Install/Fetch.pm

PAR-Packer-1.013/inc/Module/Install/Include.pm

PAR-Packer-1.013/inc/Module/Install/Metadata.pm

PAR-Packer-1.013/inc/Module/Install/Can.pm

PAR-Packer-1.013/inc/Module/Install/Base.pm

PAR-Packer-1.013/script/

PAR-Packer-1.013/script/pp

PAR-Packer-1.013/script/par.pl

PAR-Packer-1.013/script/tkpp

PAR-Packer-1.013/script/parl.pod

PAR-Packer-1.013/t/

PAR-Packer-1.013/t/20-pp.t

PAR-Packer-1.013/t/30-current_exec.t

PAR-Packer-1.013/t/00-pod.t

PAR-Packer-1.013/t/test-proc

PAR-Packer-1.013/t/40-packer_cd_option.t

PAR-Packer-1.013/t/90-rt59710.t

PAR-Packer-1.013/t/10-parl-generation.t

PAR-Packer-1.013/Makefile.PL

PAR-Packer-1.013/package/

PAR-Packer-1.013/package/parl.nsi

PAR-Packer-1.013/ChangeLog

PAR-Packer-1.013/lib/

PAR-Packer-1.013/lib/PAR/

PAR-Packer-1.013/lib/PAR/Packer.pm

PAR-Packer-1.013/lib/PAR/StrippedPARL/

PAR-Packer-1.013/lib/PAR/StrippedPARL/Base.pm

PAR-Packer-1.013/lib/PAR/Filter/

PAR-Packer-1.013/lib/PAR/Filter/PodStrip.pm

PAR-Packer-1.013/lib/PAR/Filter/Bleach.pm

PAR-Packer-1.013/lib/PAR/Filter/PatchContent.pm

PAR-Packer-1.013/lib/PAR/Filter/Bytecode.pm

PAR-Packer-1.013/lib/PAR/Filter/Obfuscate.pm

PAR-Packer-1.013/lib/PAR/Filter.pm

PAR-Packer-1.013/lib/pp.pm

PAR-Packer-1.013/lib/App/

PAR-Packer-1.013/lib/App/Packer/

PAR-Packer-1.013/lib/App/Packer/PAR.pm

PAR-Packer-1.013/TODO

PAR-Packer-1.013/MANIFEST

PAR-Packer-1.013/README

PAR-Packer-1.013/AUTHORS

PAR-Packer-1.013/META.yml

[root@test software]# cd PAR-Packer-1.013

[root@test PAR-Packer-1.013]# perl Makefile.PL

Checking if your kit is complete...

Looks good

Prototype mismatch: sub main::prompt: none vs ($;$) at /usr/local/lib/perl5/5.10.1/ExtUtils/MakeMaker.pm line 202(注意:本行提示信息不影响此程序编译安装)

Writing Makefile for par

Writing Makefile for PAR::Packer

[root@test PAR-Packer-1.013]# make

cp lib/App/Packer/PAR.pm blib/lib/App/Packer/PAR.pm

cp lib/PAR/Packer.pm blib/lib/PAR/Packer.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/StrippedPARL/Base.pm blib/lib/PAR/StrippedPARL/Base.pm

cp lib/PAR/Filter.pm blib/lib/PAR/Filter.pm

cp lib/PAR/Filter/PatchContent.pm blib/lib/PAR/Filter/PatchContent.pm

cp lib/PAR/Filter/Bytecode.pm blib/lib/PAR/Filter/Bytecode.pm

cp lib/pp.pm blib/lib/pp.pm

cp lib/PAR/Filter/Bleach.pm blib/lib/PAR/Filter/Bleach.pm

make[1]: Entering directory `/home/software/PAR-Packer-1.013/myldr'

Makefile:721: warning: overriding commands for target `.c.o'

Makefile:331: warning: ignoring old commands for target `.c.o'

/usr/bin/perl ./file2c.pl -s ../script/par.pl my_par_pl.c load_my_par_pl

/usr/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.10.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.10.1/x86_64-linux/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lc -o ./par

true

/usr/bin/perl encode_append.pl Dynamic.in ./par Dynamic.pm

/usr/bin/perl ./file2c.pl -c 30000 ./par my_par.c load_my_par

/usr/bin/perl ./file2c.pl -c 30000 -n libperl.a /usr/local/lib/perl5/5.10.1/x86_64-linux/CORE/libperl.a my_libperl.c load_my_libperl

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.10.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.10.1/x86_64-linux/CORE -lnsl -ldl -lm -lcrypt -lutil -lc  -o ./boot

true

/usr/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/bin/perl -Mblib run_with_inc.pl ./par -q -B -Oparldyn

cp parldyn ../blib/script/parldyn

true ../blib/script/parldyn

/usr/bin/perl -Mblib run_with_inc.pl ./boot -q -B -Oparl

cp parl ../blib/script/parl

true ../blib/script/parl

Manifying ../blib/man1/parldyn.1

Manifying ../blib/man1/parl.1

make[1]: Leaving directory `/home/software/PAR-Packer-1.013/myldr'

cp script/tkpp blib/script/tkpp

/usr/bin/perl "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/tkpp

cp script/pp blib/script/pp

/usr/bin/perl "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/pp

cp script/par.pl blib/script/par.pl

/usr/bin/perl "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/par.pl

Manifying blib/man1/tkpp.1

Manifying blib/man1/pp.1

Manifying blib/man1/par.pl.1

Manifying blib/man3/PAR::StrippedPARL::Base.3

Manifying blib/man3/PAR::Filter::Obfuscate.3

Manifying blib/man3/PAR::Filter::PodStrip.3

Manifying blib/man3/PAR::Packer.3

Manifying blib/man3/App::Packer::PAR.3

Manifying blib/man3/PAR::Filter.3

Manifying blib/man3/PAR::Filter::PatchContent.3

Manifying blib/man3/PAR::Filter::Bytecode.3

Manifying blib/man3/pp.3

Manifying blib/man3/PAR::Filter::Bleach.3

[root@test PAR-Packer-1.013]# make test

make[1]: Entering directory `/home/software/PAR-Packer-1.013/myldr'

Makefile:721: warning: overriding commands for target `.c.o'

Makefile:331: warning: ignoring old commands for target `.c.o'

make[1]: Leaving directory `/home/software/PAR-Packer-1.013/myldr'

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/00-pod.t t/10-parl-generation.t t/20-pp.t t/30-current_exec.t t/40-packer_cd_option.t t/90-rt59710.t

t/00-pod.t ............... skipped: Set environment variable PERL_TEST_POD=1 to test POD

t/10-parl-generation.t ... ok

t/20-pp.t ................ 12/34 /tmp/RkZF8yOqmI syntax OK

t/20-pp.t ................ ok

t/30-current_exec.t ...... # Please wait

t/30-current_exec.t ...... ok

t/40-packer_cd_option.t .. ok

t/90-rt59710.t ........... ok

All tests successful.

Files=6, Tests=74, 216 wallclock secs ( 0.07 usr  0.01 sys + 193.49 cusr 18.80 csys = 212.37 CPU)

Result: PASSmake[1]: Entering directory `/home/software/PAR-Packer-1.013/myldr'

Makefile:721: warning: overriding commands for target `.c.o'

Makefile:331: warning: ignoring old commands for target `.c.o'

make[1]: Nothing to be done for `test'.

make[1]: Leaving directory `/home/software/PAR-Packer-1.013/myldr'

[root@test PAR-Packer-1.013]#

[root@test PAR-Packer-1.013]# make install

make[1]: Entering directory `/home/software/PAR-Packer-1.013/myldr'

Makefile:721: warning: overriding commands for target `.c.o'

Makefile:331: warning: ignoring old commands for target `.c.o'

make[1]: Leaving directory `/home/software/PAR-Packer-1.013/myldr'

Installing /usr/local/lib/perl5/site_perl/5.10.1/pp.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/App/Packer/PAR.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/Filter.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/Packer.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/Filter/PodStrip.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/Filter/Obfuscate.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/Filter/Bleach.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/Filter/Bytecode.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/Filter/PatchContent.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/StrippedPARL/Static.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/StrippedPARL/Base.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/StrippedPARL/Dynamic.pm

Installing /usr/local/share/man/man1/par.pl.1

Installing /usr/local/share/man/man1/parldyn.1

Installing /usr/local/share/man/man1/tkpp.1

Installing /usr/local/share/man/man1/parl.1

Installing /usr/local/share/man/man1/pp.1

Installing /usr/local/share/man/man3/PAR::Filter::Obfuscate.3

Installing /usr/local/share/man/man3/PAR::StrippedPARL::Base.3

Installing /usr/local/share/man/man3/PAR::Filter::PodStrip.3

Installing /usr/local/share/man/man3/pp.3

Installing /usr/local/share/man/man3/PAR::Packer.3

Installing /usr/local/share/man/man3/PAR::Filter::PatchContent.3

Installing /usr/local/share/man/man3/PAR::Filter.3

Installing /usr/local/share/man/man3/App::Packer::PAR.3

Installing /usr/local/share/man/man3/PAR::Filter::Bleach.3

Installing /usr/local/share/man/man3/PAR::Filter::Bytecode.3

Installing /usr/local/bin/parl

Installing /usr/local/bin/tkpp

Installing /usr/local/bin/parldyn

Installing /usr/local/bin/par.pl

Installing /usr/local/bin/pp

Appending installation info to /usr/local/lib/perl5/5.10.1/x86_64-linux/perllocal.pod

[root@test PAR-Packer-1.013]#

二、安装脚本PTY相关包

[root@test software]# tar zxvf IO-Tty-1.09.tar.gz

IO-Tty-1.09/

IO-Tty-1.09/ChangeLog

IO-Tty-1.09/Makefile.PL

IO-Tty-1.09/MANIFEST

IO-Tty-1.09/META.yml

IO-Tty-1.09/Pty.pm

IO-Tty-1.09/README

IO-Tty-1.09/t/

IO-Tty-1.09/try

IO-Tty-1.09/Tty.pm

IO-Tty-1.09/Tty.xs

IO-Tty-1.09/t/test.t

[root@test software]# cd IO-Tty-1.09

[root@test IO-Tty-1.09]# perl Makefile.PL

Now let's see what we can find out about your system

(logfiles of failing tests are available in the conf/ dir)...

Looking for _getpty()...... not found.

Looking for getpt()........ FOUND.

Looking for grantpt()...... FOUND.

Looking for openpty()...... FOUND.

Looking for posix_openpt(). FOUND.

Looking for ptsname()...... FOUND.

Looking for ptsname_r().... FOUND.

Looking for sigaction().... FOUND.

Looking for strlcpy()...... not found.

Looking for ttyname()...... FOUND.

Looking for unlockpt()..... FOUND.

Looking for libutil.h...... not found.

Looking for pty.h.......... FOUND.

Looking for sys/pty.h...... not found.

Looking for sys/ptyio.h.... not found.

Looking for sys/stropts.h.. FOUND.

Looking for termio.h....... FOUND.

Looking for termios.h...... FOUND.

Looking for util.h......... not found.

Checking which symbols compile OK...

(sorry for the tedious check, but some systems have not too clean

header files, to say the least;  '+' means OK, '-' means not defined

and '*' has compile problems...)

+B0 +B110 +B115200 +B1200 +B134 +B150 -B153600 +B1800 +B19200 +B200 +B230400 +B2400 +B300 -B307200 +B38400 +B460800 +B4800 +B50 +B57600 +B600 +B75 -B76800 +B9600 +BRKINT +BS0 +BS1 +BSDLY +CBAUD -CBAUDEXT +CBRK -CCTS_OFLOW -CDEL +CDSUSP +CEOF +CEOL -CEOL2 +CEOT +CERASE -CESC +CFLUSH +CIBAUD -CIBAUDEXT +CINTR +CKILL +CLNEXT +CLOCAL -CNSWTCH -CNUL +CQUIT +CR0 +CR1 +CR2 +CR3 +CRDLY +CREAD +CRPRNT +CRTSCTS -CRTSXOFF -CRTS_IFLOW +CS5 +CS6 +CS7 +CS8 +CSIZE +CSTART +CSTOP +CSTOPB +CSUSP -CSWTCH +CWERASE -DEFECHO -DIOC -DIOCGETP -DIOCSETP -DOSMODE +ECHO +ECHOCTL +ECHOE +ECHOK +ECHOKE +ECHONL +ECHOPRT +EXTA +EXTB +FF0 +FF1 +FFDLY -FIORDCHK +FLUSHO +HUPCL +ICANON +ICRNL +IEXTEN +IGNBRK +IGNCR +IGNPAR +IMAXBEL +INLCR +INPCK +ISIG +ISTRIP +IUCLC +IXANY +IXOFF +IXON -KBENABLED -LDCHG -LDCLOSE -LDDMAP -LDEMAP -LDGETT -LDGMAP -LDIOC -LDNMAP -LDOPEN -LDSETT -LDSMAP -LOBLK +NCCS +NL0 +NL1 +NLDLY +NOFLSH +OCRNL +OFDEL +OFILL +OLCUC +ONLCR +ONLRET +ONOCR +OPOST -PAGEOUT +PARENB -PAREXT +PARMRK +PARODD +PENDIN -RCV1EN -RTS_TOG +TAB0 +TAB1 +TAB2 +TAB3 +TABDLY -TCDSET +TCFLSH +TCGETA +TCGETS +TCIFLUSH +TCIOFF +TCIOFLUSH +TCION +TCOFLUSH +TCOOFF +TCOON +TCSADRAIN +TCSAFLUSH +TCSANOW +TCSBRK +TCSETA +TCSETAF +TCSETAW -TCSETCTTY +TCSETS +TCSETSF +TCSETSW +TCXONC -TERM_D40 -TERM_D42 -TERM_H45 -TERM_NONE -TERM_TEC -TERM_TEX -TERM_V10 -TERM_V61 +TIOCCBRK -TIOCCDTR +TIOCCONS +TIOCEXCL -TIOCFLUSH -TIOCGETC +TIOCGETD -TIOCGETP -TIOCGLTC +TIOCGPGRP +TIOCGSID +TIOCGSOFTCAR +TIOCGWINSZ -TIOCHPCL -TIOCKBOF -TIOCKBON -TIOCLBIC -TIOCLBIS -TIOCLGET -TIOCLSET +TIOCMBIC +TIOCMBIS +TIOCMGET +TIOCMSET +TIOCM_CAR +TIOCM_CD +TIOCM_CTS +TIOCM_DSR +TIOCM_DTR +TIOCM_LE +TIOCM_RI +TIOCM_RNG +TIOCM_RTS +TIOCM_SR +TIOCM_ST +TIOCNOTTY +TIOCNXCL +TIOCOUTQ -TIOCREMOTE +TIOCSBRK +TIOCSCTTY -TIOCSDTR -TIOCSETC +TIOCSETD -TIOCSETN -TIOCSETP -TIOCSIGNAL -TIOCSLTC +TIOCSPGRP -TIOCSSID +TIOCSSOFTCAR -TIOCSTART +TIOCSTI -TIOCSTOP +TIOCSWINSZ -TM_ANL -TM_CECHO -TM_CINVIS -TM_LCF -TM_NONE -TM_SET -TM_SNL +TOSTOP -VCEOF -VCEOL +VDISCARD -VDSUSP +VEOF +VEOL +VEOL2 +VERASE +VINTR +VKILL +VLNEXT +VMIN +VQUIT +VREPRINT +VSTART +VSTOP +VSUSP -VSWTCH +VT0 +VT1 +VTDLY +VTIME +VWERASE -WRAP +XCASE -XCLUDE -XMT1EN +XTABS

>>> Configuration looks good! <<<

Writing IO::Tty::Constant.pm...

DEFINE = -DHAVE_DEV_PTMX -DHAVE_GETPT -DHAVE_GRANTPT -DHAVE_OPENPTY -DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_PTSNAME_R -DHAVE_PTY_H -DHAVE_SIGACTION -DHAVE_SYS_STROPTS_H -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE_UNLOCKPT

Checking if your kit is complete...

Looks good

Writing Makefile for IO::Tty

[root@test IO-Tty-1.09]# make

cp Tty.pm blib/lib/IO/Tty.pm

cp Tty/Constant.pm blib/lib/IO/Tty/Constant.pm

cp Pty.pm blib/lib/IO/Pty.pm

/usr/bin/perl /usr/local/lib/perl5/5.10.1/ExtUtils/xsubpp  -typemap /usr/local/lib/perl5/5.10.1/ExtUtils/typemap  Tty.xs > Tty.xsc && mv Tty.xsc Tty.c

cc -c   -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"1.09\" -DXS_VERSION=\"1.09\" -fPIC "-I/usr/local/lib/perl5/5.10.1/x86_64-linux/CORE"  -DHAVE_DEV_PTMX -DHAVE_GETPT -DHAVE_GRANTPT -DHAVE_OPENPTY -DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_PTSNAME_R -DHAVE_PTY_H -DHAVE_SIGACTION -DHAVE_SYS_STROPTS_H -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE_UNLOCKPT Tty.c

Running Mkbootstrap for IO::Tty ()

chmod 644 Tty.bs

rm -f blib/arch/auto/IO/Tty/Tty.so

cc  -shared -O2 -L/usr/local/lib -fstack-protector Tty.o  -o blib/arch/auto/IO/Tty/Tty.so       \

-lutil       \

chmod 755 blib/arch/auto/IO/Tty/Tty.so

cp Tty.bs blib/arch/auto/IO/Tty/Tty.bs

chmod 644 blib/arch/auto/IO/Tty/Tty.bs

Manifying blib/man3/IO::Tty::Constant.3

Manifying blib/man3/IO::Tty.3

Manifying blib/man3/IO::Pty.3

[root@test IO-Tty-1.09]# make test

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t

t/test.t .. # Configuration: -DHAVE_DEV_PTMX -DHAVE_GETPT -DHAVE_GRANTPT -DHAVE_OPENPTY -DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_PTSNAME_R -DHAVE_PTY_H -DHAVE_SIGACTION -DHAVE_SYS_STROPTS_H -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE_UNLOCKPT

# Checking for appropriate ioctls:

# TIOCNOTTY

# TIOCSCTTY

trying posix_openpt()...

trying grantpt()...

trying unlockpt()...

trying ptsname_r()...

trying to open /dev/pts/2...

trying to I_PUSH ptem...

trying to I_PUSH ldterm...

trying to I_PUSH ttcompat...

t/test.t .. 1/5 #  === Checking if child gets pty as controlling terminal

trying posix_openpt()...

trying grantpt()...

trying unlockpt()...

trying ptsname_r()...

trying to open /dev/pts/2...

trying to I_PUSH ptem...

trying to I_PUSH ldterm...

trying to I_PUSH ttcompat...

t/test.t .. 3/5

WARNING: when the client closes the slave pty, the master gets an error

(undef return value and $! eq "Input/output error")

instead of EOF (0 return value).  Please be sure to handle this

in your application (Expect already does).

# Checking basic functionality and how your ptys handle large strings...

#   This test may hang on certain systems, even though it is protected

#   by alarm().  If the counter stops, try Ctrl-C, the test should continue.

trying posix_openpt()...

trying grantpt()...

trying unlockpt()...

trying ptsname_r()...

trying to open /dev/pts/2...

trying to I_PUSH ptem...

trying to I_PUSH ldterm...

trying to I_PUSH ttcompat...

# isatty($master): YES

# isatty($slave): YES

# Child PID = 19271

# Good, your raw ptys can handle at least 530 bytes at once.

t/test.t .. 5/5 Slave got EOF at line 530, byte 0.

t/test.t .. ok

All tests successful.

Files=1, Tests=5,  4 wallclock secs ( 0.04 usr  0.01 sys +  0.22 cusr  0.77 csys =  1.04 CPU)

Result: PASS

[root@test IO-Tty-1.09]# make install

Files found in blib/arch: installing files in blib/lib into architecture dependent library tree

Installing /usr/local/lib/perl5/site_perl/5.10.1/x86_64-linux/auto/IO/Tty/Tty.bs

Installing /usr/local/lib/perl5/site_perl/5.10.1/x86_64-linux/auto/IO/Tty/Tty.so

Installing /usr/local/lib/perl5/site_perl/5.10.1/x86_64-linux/IO/Tty.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/x86_64-linux/IO/Pty.pm

Installing /usr/local/lib/perl5/site_perl/5.10.1/x86_64-linux/IO/Tty/Constant.pm

Installing /usr/local/share/man/man3/IO::Tty::Constant.3

Installing /usr/local/share/man/man3/IO::Tty.3

Installing /usr/local/share/man/man3/IO::Pty.3

Appending installation info to /usr/local/lib/perl5/5.10.1/x86_64-linux/perllocal.pod

[root@test IO-Tty-1.09]#

三、打包perl脚本

典型用法

方法1

- Stand-alone setup

% pp -o packed.exe source.pl # makes packed.exe

# Now, deploy 'packed.exe' to target machine...

$ packed.exe   # run it

[root@test test]# pp -o packed opensource.pl

[root@test test]# ls

packed  opensource.pl

两种情况适用:

1)系统中没有Perl程序及相关包;

2)Perl版本不同,且脚本内关联包不存在时,亦可运行。

方法2

- Perl interpreter only, without core modules:

% pp -B -p source.pl  # makes source.par

% par.pl -B -Opacked.pl source.par  # makes packed.pl

# Now, deploy 'packed.pl' to target machine...

$ perl packed.pl   # run it

[root@test test]# pp -B -p opensource.pl

[root@test test]# ll

total 1740

-rw-r--r-- 1 root root 1773299 Oct  9 14:17 a.par

-rwxr-xr-x 1 root root    1176 Oct  9 14:14 opensource.pl

[root@test test]# par.pl -B -Opacked.pl a.par

[root@test test]# ll

total 4472

-rw-r--r-- 1 root root 1773299 Oct  9 14:17 a.par

-rwxr-xr-x 1 root root 2791806 Oct  9 14:17 packed.pl

-rwxr-xr-x 1 root root    1176 Oct  9 14:14 opensource.pl

[root@test test]#

方法3

- Perl with core module installed:

% pp -p source.pl   # makes source.par

% par.pl -b -Opacked.pl source.par # makes packed.pl

# Now, deploy 'packed.pl' to target machine...

$ perl packed.pl   # run it

测试结果失败,无法在其他没有模块的机器上运行

你可能感兴趣的:(perl,linux,独立运行)