I have several perl installations that came along with various conda environments. Because of this one of the tools I am using is unable to access a PERL module URI::Escape:
Perl script to test module installations:
$ cat test.pl
use Set::IntervalTree;
use DB_File;
use URI::Escape;
Current perl being used works okay:
$ which perl
/home/rathik/tools/miniconda3/envs/rnaseq-env/bin/perl
$ perl test.pl # runs okay
Trouble with URI::Escape using the perl installation used by my tool:
$ /home/rathik/tools/miniconda3/bin/perl test.pl
Can't locate URI/Escape.pm in #INC (you may need to install the URI::Escape module) (#INC contains: /home/rathik/perl5/lib/perl5/5.22.0/x86_64-linux /home/rathik/perl5/lib/perl5/5.22.0 /home/rathik/perl5/lib/perl5/x86_64-linux /home/rathik/perl5/lib/perl5 /home/rathik/tools/miniconda3/lib/perl5/site_perl/5.22.0/x86_64-linux /home/rathik/tools/miniconda3/lib/perl5/site_perl/5.22.0 /home/rathik/tools/miniconda3/lib/perl5/5.22.0/x86_64-linux /home/rathik/tools/miniconda3/lib/perl5/5.22.0 .) at test.pl line 3.
BEGIN failed--compilation aborted at test.pl line 3.
When I try to install it, it throws this error:
# install URI::Escape
/home/rathik/tools/miniconda3/bin/perl -MCPAN -e shell
OR
/home/rathik/tools/miniconda3/bin/cpan URI::Escape
Test Summary Report
-------------------
t/old-base.t (Wstat: 7680 Tests: 4 Failed: 1)
Failed test: 4
Non-zero exit status: 30
Parse errors: No plan found in TAP output
Files=43, Tests=619, 2 wallclock secs ( 0.23 usr 0.07 sys + 1.60 cusr 0.47 csys = 2.37 CPU)
Result: FAIL
Failed 1/43 test programs. 1/619 subtests failed.
make: *** [test_dynamic] Error 255
ETHER/URI-1.71.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports ETHER/URI-1.71.tar.gz
Failed during this command:
ETHER/URI-1.71.tar.gz : make_test NO
I am able to install URI::Escape using the current perl but not with the perl that's being used by my tool. How do I resolve the conflicts?
CPAN Installation Log:
Reading '/home/rathik/.cpan/Metadata'
Database was generated on Sun, 05 Mar 2017 21:29:02 GMT
Running install for module 'URI::Escape'
Checksum for /home/rathik/.cpan/sources/authors/id/E/ET/ETHER/URI-1.71.tar.gz ok
Scanning cache /home/rathik/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring E/ET/ETHER/URI-1.71.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for URI
Writing MYMETA.yml and MYMETA.json
ETHER/URI-1.71.tar.gz
/home/rathik/tools/miniconda3/bin/perl Makefile.PL -- OK
Running make for E/ET/ETHER/URI-1.71.tar.gz
cp lib/URI/sips.pm blib/lib/URI/sips.pm
cp lib/URI/sip.pm blib/lib/URI/sip.pm
cp lib/URI/snews.pm blib/lib/URI/snews.pm
cp lib/URI/WithBase.pm blib/lib/URI/WithBase.pm
cp lib/URI/file/Mac.pm blib/lib/URI/file/Mac.pm
cp lib/URI/ssh.pm blib/lib/URI/ssh.pm
cp lib/URI/file/OS2.pm blib/lib/URI/file/OS2.pm
cp lib/URI/Heuristic.pm blib/lib/URI/Heuristic.pm
cp lib/URI/file/QNX.pm blib/lib/URI/file/QNX.pm
cp lib/URI/_userpass.pm blib/lib/URI/_userpass.pm
cp lib/URI/_foreign.pm blib/lib/URI/_foreign.pm
cp lib/URI/tn3270.pm blib/lib/URI/tn3270.pm
cp lib/URI/file.pm blib/lib/URI/file.pm
cp lib/URI/rsync.pm blib/lib/URI/rsync.pm
cp lib/URI/ftp.pm blib/lib/URI/ftp.pm
cp lib/URI/Split.pm blib/lib/URI/Split.pm
cp lib/URI/file/Win32.pm blib/lib/URI/file/Win32.pm
cp lib/URI/URL.pm blib/lib/URI/URL.pm
cp lib/URI/pop.pm blib/lib/URI/pop.pm
cp lib/URI/_idna.pm blib/lib/URI/_idna.pm
cp lib/URI/file/Unix.pm blib/lib/URI/file/Unix.pm
cp lib/URI/rtspu.pm blib/lib/URI/rtspu.pm
cp lib/URI/QueryParam.pm blib/lib/URI/QueryParam.pm
cp lib/URI/sftp.pm blib/lib/URI/sftp.pm
cp lib/URI/ldapi.pm blib/lib/URI/ldapi.pm
cp lib/URI/file/Base.pm blib/lib/URI/file/Base.pm
cp lib/URI/_punycode.pm blib/lib/URI/_punycode.pm
cp lib/URI/_query.pm blib/lib/URI/_query.pm
cp lib/URI/data.pm blib/lib/URI/data.pm
cp lib/URI/urn.pm blib/lib/URI/urn.pm
cp lib/URI/_ldap.pm blib/lib/URI/_ldap.pm
cp lib/URI/rtsp.pm blib/lib/URI/rtsp.pm
cp lib/URI/IRI.pm blib/lib/URI/IRI.pm
cp lib/URI/_login.pm blib/lib/URI/_login.pm
cp lib/URI/telnet.pm blib/lib/URI/telnet.pm
cp lib/URI.pm blib/lib/URI.pm
cp lib/URI/nntp.pm blib/lib/URI/nntp.pm
cp lib/URI/urn/oid.pm blib/lib/URI/urn/oid.pm
cp lib/URI/urn/isbn.pm blib/lib/URI/urn/isbn.pm
cp lib/URI/gopher.pm blib/lib/URI/gopher.pm
cp lib/URI/ldaps.pm blib/lib/URI/ldaps.pm
cp lib/URI/_segment.pm blib/lib/URI/_segment.pm
cp lib/URI/news.pm blib/lib/URI/news.pm
cp lib/URI/rlogin.pm blib/lib/URI/rlogin.pm
cp lib/URI/mms.pm blib/lib/URI/mms.pm
cp lib/URI/http.pm blib/lib/URI/http.pm
cp lib/URI/mailto.pm blib/lib/URI/mailto.pm
cp lib/URI/Escape.pm blib/lib/URI/Escape.pm
cp lib/URI/ldap.pm blib/lib/URI/ldap.pm
cp lib/URI/https.pm blib/lib/URI/https.pm
cp lib/URI/_server.pm blib/lib/URI/_server.pm
cp lib/URI/_generic.pm blib/lib/URI/_generic.pm
cp lib/URI/file/FAT.pm blib/lib/URI/file/FAT.pm
Manifying 11 pod documents
ETHER/URI-1.71.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/home/rathik/tools/miniconda3/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/abs.t ................... ok
t/clone.t ................. ok
t/cwd.t ................... ok
t/data.t .................. ok
t/distmanifest.t .......... skipped: these tests are for authors only!
t/escape-char.t ........... ok
t/escape.t ................ ok
t/file.t .................. ok
t/ftp.t ................... ok
t/generic.t ............... ok
t/gopher.t ................ ok
t/heuristic.t ............. ok
t/http.t .................. ok
t/idna.t .................. ok
t/iri.t ................... ok
t/ldap.t .................. ok
t/mailto.t ................ ok
t/mix.t ................... ok
t/mms.t ................... ok
t/news.t .................. ok
t/num_eq.t ................ ok
t/old-absconf.t ........... ok
t/old-base.t .............. 1/? Error in tempdir() using /mnt/lustre/users/rathik/scratch/XXXXXXXXXX: Could not create directory /mnt/lustre/users/rathik/scratch/P_z_9i_Dit: Read-only file system at t/old-base.t line 615.
# Child (newlocal test) exited without calling finalize()
# Failed test 'newlocal test'
# at /home/rathik/tools/miniconda3/lib/perl5/5.22.0/Test/Builder.pm line 279.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 30 just after 4.
t/old-base.t .............. Dubious, test returned 30 (wstat 7680, 0x1e00)
Failed 1/4 subtests
t/old-file.t .............. ok
t/old-relbase.t ........... ok
t/path-segments.t ......... ok
t/pop.t ................... ok
t/punycode.t .............. ok
t/query-param.t ........... ok
t/query.t ................. ok
t/rel.t ................... ok
t/rfc2732.t ............... ok
t/roy-test.t .............. ok
t/rsync.t ................. ok
t/rtsp.t .................. ok
t/scheme-exceptions.t ..... ok
t/sip.t ................... ok
t/sort-hash-query-form.t .. ok
t/split.t ................. ok
t/storable.t .............. ok
t/urn-isbn.t .............. skipped: Needs the Business::ISBN module installed
t/urn-oid.t ............... ok
t/utf8.t .................. ok
Test Summary Report
-------------------
t/old-base.t (Wstat: 7680 Tests: 4 Failed: 1)
Failed test: 4
Non-zero exit status: 30
Parse errors: No plan found in TAP output
Files=43, Tests=619, 3 wallclock secs ( 0.21 usr 0.08 sys + 1.61 cusr 0.64 csys = 2.54 CPU)
Result: FAIL
Failed 1/43 test programs. 1/619 subtests failed.
make: *** [test_dynamic] Error 255
ETHER/URI-1.71.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports ETHER/URI-1.71.tar.gz
Failed during this command:
ETHER/URI-1.71.tar.gz : make_test NO
Each installation of the perl binary should have a corresponding installation of cpan. To install a module that will be visible to /home/rathik/tools/miniconda3/bin/perl, install it with /home/rathik/tools/miniconda3/bin/cpan.
Related
there was a problem installing the AnyEvent::DBI for perl v5.18.2 on macOS High Sierra 10.13.3
As I understood, the AnyEvent::Fork dependency module is not installed, here's the information from CPAN
cpan[1]> install AnyEvent::Fork
Reading '/Users/dmitry/.cpan/Metadata'
Database was generated on Tue, 20 Feb 2018 15:29:03 GMT
Running install for module 'AnyEvent::Fork'
Checksum for /Users/dmitry/.cpan/sources/authors/id/M/ML/MLEHMANN/AnyEvent-Fork-1.31.tar.gz ok
Scanning cache /Users/dmitry/.cpan/build for sizes
............................................................................DONE
Configuring M/ML/MLEHMANN/AnyEvent-Fork-1.31.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for AnyEvent::Fork
Writing MYMETA.yml and MYMETA.json
MLEHMANN/AnyEvent-Fork-1.31.tar.gz
/usr/bin/perl Makefile.PL -- OK
Running make for M/ML/MLEHMANN/AnyEvent-Fork-1.31.tar.gz
cp Fork/Template.pm blib/lib/AnyEvent/Fork/Template.pm
cp Fork/Serve.pm blib/lib/AnyEvent/Fork/Serve.pm
cp Fork/Early.pm blib/lib/AnyEvent/Fork/Early.pm
cp Fork.pm blib/lib/AnyEvent/Fork.pm
Manifying 3 pod documents
MLEHMANN/AnyEvent-Fork-1.31.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_load.t ...... ok
t/01_early.t ..... ok
t/02_template.t .. ok
t/03_new.t ....... ok
t/04_tofrom.t .... Failed 2/18 subtests
Test Summary Report
-------------------
t/04_tofrom.t (Wstat: 0 Tests: 18 Failed: 2)
Failed tests: 16-17
Files=5, Tests=34, 1 wallclock secs ( 0.04 usr 0.02 sys + 0.15 cusr 0.04 csys = 0.25 CPU)
Result: FAIL
Failed 1/5 test programs. 2/34 subtests failed.
make: *** [test_dynamic] Error 255
MLEHMANN/AnyEvent-Fork-1.31.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MLEHMANN/AnyEvent-Fork-1.31.tar.gz
Failed during this command:
MLEHMANN/AnyEvent-Fork-1.31.tar.gz : make_test NO
cpan[2]> reports MLEHMANN/AnyEvent-Fork-1.31.tar.gz
Distribution: M/ML/MLEHMANN/AnyEvent-Fork-1.31.tar.gz
Fetching 'http://www.cpantesters.org/show/AnyEvent-Fork.yaml'...DONE
Catching error: "CPAN::Exception::yaml_process_error=HASH(0x7fdfcd59c350)" at /Library/Perl/Updates/5.18.2/CPAN.pm line 392.
CPAN::shell() called at /Library/Perl/Updates/5.18.2/App/Cpan.pm line 414
App::Cpan::_process_options("App::Cpan") called at /Library/Perl/Updates/5.18.2/App/Cpan.pm line 511
App::Cpan::run("App::Cpan") called at /usr/local/bin/cpan line 10
cpan[3]>
The most interesting on the previous version of macOS I installed this module.
I'm completely new to Perl, so maybe there is something obvious I'm not seeing.
I'm using perl to compile PostgreSQL database (C++) and I need to call an "install" command (here there are PostgreSQL installation instructions, and source files with code used), this is the output:
Can't locate Install.pm in #INC (you may need to install the Install module)
(#INC contains: shows/me/several/directories/
BEGIN failed--compilation aborted at install.pl line 9.
Searching internet about this error, I found that I have to install Module::Install and here comes the error:
$ cpan Module::Install
Loading internal null logger. Install Log::Log4perl for logging messages
CPAN: CPAN::SQLite loaded ok (v0.211)
Database was generated on Mon, 11 Sep 2017 15:32:15 GMT
Running install for module 'Module::Install'
CPAN: Digest::SHA loaded ok (v5.96)
CPAN: Compress::Zlib loaded ok (v2.074)
Checksum for C:\Users\e047439\.conan\data\strawberryperl\5.26.0\conan\stable\package\ca33edce272a279b24f87dc0d4cf5bbdcffbc187\cpan\sources\authors\id\E\ET\ETHER\Module-Install-1.18.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.26)
CPAN: YAML::XS loaded ok (v0.65)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20170530)
Configuring E/ET/ETHER/Module-Install-1.18.tar.gz with Makefile.PL
include C:/Users/e047439/.conan/data/strawberryperl/5.26.0/conan/stable/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/cpan/build/Module-Install-1.18-4/inc/Module/Install.pm
include inc/Module/Install/Metadata.pm
include inc/Module/Install/Base.pm
include inc/Module/Install/Makefile.pm
include inc/Module/Install/With.pm
include inc/Module/Install/WriteAll.pm
include inc/Module/Install/Win32.pm
include inc/Module/Install/Can.pm
include inc/Module/Install/Fetch.pm
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Module::Install
Writing MYMETA.yml and MYMETA.json
Writing META.yml
ETHER/Module-Install-1.18.tar.gz
C:\Users\e047439\.conan\data\strawberryperl\5.26.0\conan\stable\package\ca33edce272a279b24f87dc0d4cf5bbdcffbc187\perl\bin\perl.exe Makefile.PL -- OK
Running make for E/ET/ETHER/Module-Install-1.18.tar.gz
cp lib/Module/Install/Admin/Makefile.pm blib\lib\Module\Install\Admin\Makefile.pm
cp lib/Module/Install/Admin/Compiler.pm blib\lib\Module\Install\Admin\Compiler.pm
cp lib/Module/Install/Admin/Manifest.pm blib\lib\Module\Install\Admin\Manifest.pm
cp lib/Module/Install/Admin/Metadata.pm blib\lib\Module\Install\Admin\Metadata.pm
cp lib/Module/Install/Admin.pm blib\lib\Module\Install\Admin.pm
cp lib/Module/Install/Admin/Include.pm blib\lib\Module\Install\Admin\Include.pm
cp lib/Module/Install/Bundle.pm blib\lib\Module\Install\Bundle.pm
cp lib/Module/Install/Can.pm blib\lib\Module\Install\Can.pm
cp lib/Module/Install/Admin/WriteAll.pm blib\lib\Module\Install\Admin\WriteAll.pm
cp lib/Module/Install/Base.pm blib\lib\Module\Install\Base.pm
cp lib/Module/Install/Admin/Find.pm blib\lib\Module\Install\Admin\Find.pm
cp lib/Module/Install/Admin/ScanDeps.pm blib\lib\Module\Install\Admin\ScanDeps.pm
cp lib/Module/Install.pod blib\lib\Module\Install.pod
cp lib/Module/Install.pm blib\lib\Module\Install.pm
cp lib/Module/Install/Admin/Bundle.pm blib\lib\Module\Install\Admin\Bundle.pm
cp lib/Module/Install/AutoInstall.pm blib\lib\Module\Install\AutoInstall.pm
cp lib/Module/Install/API.pod blib\lib\Module\Install\API.pod
cp lib/Module/AutoInstall.pm blib\lib\Module\AutoInstall.pm
cp lib/Module/Install/With.pm blib\lib\Module\Install\With.pm
cp lib/Module/Install/Run.pm blib\lib\Module\Install\Run.pm
cp lib/Module/Install/Deprecated.pm blib\lib\Module\Install\Deprecated.pm
cp lib/Module/Install/PAR.pm blib\lib\Module\Install\PAR.pm
cp lib/Module/Install/Scripts.pm blib\lib\Module\Install\Scripts.pm
cp lib/Module/Install/Win32.pm blib\lib\Module\Install\Win32.pm
cp lib/Module/Install/Fetch.pm blib\lib\Module\Install\Fetch.pm
cp lib/Module/Install/Include.pm blib\lib\Module\Install\Include.pm
cp lib/Module/Install/MakeMaker.pm blib\lib\Module\Install\MakeMaker.pm
cp lib/Module/Install/Makefile.pm blib\lib\Module\Install\Makefile.pm
cp lib/Module/Install/Philosophy.pod blib\lib\Module\Install\Philosophy.pod
cp lib/Module/Install/Share.pm blib\lib\Module\Install\Share.pm
cp lib/Module/Install/Compiler.pm blib\lib\Module\Install\Compiler.pm
cp lib/Module/Install/WriteAll.pm blib\lib\Module\Install\WriteAll.pm
cp lib/Module/Install/Metadata.pm blib\lib\Module\Install\Metadata.pm
cp lib/Module/Install/Inline.pm blib\lib\Module\Install\Inline.pm
cp lib/Module/Install/External.pm blib\lib\Module\Install\External.pm
cp lib/Module/Install/FAQ.pod blib\lib\Module\Install\FAQ.pod
cp lib/Module/Install/DSL.pm blib\lib\Module\Install\DSL.pm
cp lib/inc/Module/Install.pm blib\lib\inc\Module\Install.pm
cp lib/inc/Module/Install/DSL.pm blib\lib\inc\Module\Install\DSL.pm
ETHER/Module-Install-1.18.tar.gz
C:\Users\e047439\.conan\data\strawberryperl\5.26.0\conan\stable\package\ca33edce272a279b24f87dc0d4cf5bbdcffbc187\c\bin\gmake.exe -- OK
Running make test
"C:\Users\e047439\.conan\data\strawberryperl\5.26.0\conan\stable\package\ca33edce272a279b24f87dc0d4cf5bbdcffbc187\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/*.t t/recursive/*.t
t/01_compile.t .......................... ok
t/02_mymeta.t ........................... skipped: New EU::MM has own MYMETA support
t/03_autoinstall.t ...................... skipped: Skipping dangerous test
t/04_version.t .......................... ok
t/05_share.t ............................ 3/22
# Failed test 'make'
# at t/05_share.t line 37.
# Failed test 'Found install_share in correct dist_dir location'
# at t/05_share.t line 40.
# Failed test 'Found expected file in dist_dir location'
# at t/05_share.t line 43.
open(t\Foo39760\blib\lib\auto\share\dist\Foo\dist_file.txt): No such file or directory at (eval 27) line 3.
# Looks like your test exited with 2 just after 6.
t/05_share.t ............................ Dubious, test returned 2 (wstat 512, 0x200)
Failed 19/22 subtests
t/06_ppport.t ........................... ok
t/07_perl_version.t ..................... ok
t/08_dsl.t .............................. ok
t/09_read.t ............................. ok
t/10_test.t ............................. ok
t/11_extraction.t ....................... ok
t/12_eumm_params.t ...................... ok
t/13_author_tests.t ..................... ok
t/13_author_tests_ext.t ................. skipped: requires Module::Install::AuthorTests
t/13_author_tests_ext2.t ................ skipped: requires Module::Install::ExtraTests 0.007
t/14_auto_include_deps_with_version.t ... skipped: your perl is new enough to have File::Spec 3.30 in core
t/15_wrong_usage.t ...................... ok
t/16_require.t .......................... ok
t/17_sign.t ............................. ok
t/18_all_from.t ......................... ok
t/19_authors.t .......................... ok
t/20_authors_with_special_characters.t .. ok
t/21_makemaker_args.t ................... ok
t/22_installdirs.t ...................... 12/24 old INSTALLDIRS (probably set by makemaker_args) is overriden by installdirs
t/22_installdirs.t ...................... ok
t/23_pl_files.t ......................... ok
t/24_multiple_license_blocks.t .......... ok
t/25_perl_version_from.t ................ ok
t/26_unknown_func.t ..................... ok
t/27_build_requires_and_include.t ....... 1/14 Warning: prerequisite Test::More 9999 not found. We have 1.302085.
t/27_build_requires_and_include.t ....... ok
t/28_makemaker_args.t ................... ok
t/29_requires_from.t .................... ok
t/30_build_subdirs.t .................... ok
t/31_add_metadata.t ..................... ok
t/32_module_name.t ...................... ok
t/33_copy.t ............................. ok
t/34_readwrite.t ........................ ok
t/recursive/test.t ...................... ok
Test Summary Report
-------------------
t/05_share.t (Wstat: 512 Tests: 6 Failed: 3)
Failed tests: 4-6
Non-zero exit status: 2
Parse errors: Bad plan. You planned 22 tests but ran 6.
Files=37, Tests=541, 76 wallclock secs ( 0.25 usr + 0.25 sys = 0.50 CPU)
Result: FAIL
Failed 1/37 test programs. 3/541 subtests failed.
gmake: *** [Makefile:823: test_dynamic] Error 255
ETHER/Module-Install-1.18.tar.gz
C:\Users\e047439\.conan\data\strawberryperl\5.26.0\conan\stable\package\ca33edce272a279b24f87dc0d4cf5bbdcffbc187\c\bin\gmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports ETHER/Module-Install-1.18.tar.gz
Stopping: 'install' failed for 'Module::Install'.
Some tests are failing and I don't know neither how to bypass it nor to solve it.
Thanks in advance.
Many scripts assume the script's directory is in #INC. That usually worked because the scripts's directory often happened to be the same as the CWD, and the CWD (.) was in #INC. But it wasn't always the case, and it's virtually never the case now that . is no longer in #INC.
In src/tools/msvc/install.pl,
Before the following:
use Install qw(Install);
Add the following:
use FindBin qw( $RealBin );
use lib $RealBin;
I'm using Perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi and I'm trying to install UNIVERSAL::DOES from cpan (with sudo) using install UNIVERSAL::DOES and I get the following log:
Reading '/home/aris/.cpan/Metadata'
Database was generated on Tue, 10 Jun 2014 02:17:02 GMT
Running install for module 'UNIVERSAL::DOES'
Checksum for /home/aris/.cpan/sources/authors/id/G/GF/GFUJI/UNIVERSAL-DOES-0.004.tar.gz ok
Scanning cache /home/aris/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring G/GF/GFUJI/UNIVERSAL-DOES-0.004.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for UNIVERSAL::DOES
Writing MYMETA.yml and MYMETA.json
GFUJI/UNIVERSAL-DOES-0.004.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for G/GF/GFUJI/UNIVERSAL-DOES-0.004.tar.gz
cp lib/UNIVERSAL/DOES.pm blib/lib/UNIVERSAL/DOES.pm
Manifying blib/man3/UNIVERSAL::DOES.3pm
GFUJI/UNIVERSAL-DOES-0.004.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
t/00_load.t ... 1/1 # Testing UNIVERSAL::DOES/0.004
t/00_load.t ... ok
t/01_basic.t .. 1/45
# Failed test at t/01_basic.t line 96.
# Failed test at t/01_basic.t line 97.
# Looks like you failed 2 tests of 45.
t/01_basic.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/45 subtests
Test Summary Report
-------------------
t/01_basic.t (Wstat: 512 Tests: 45 Failed: 2)
Failed tests: 33-34
Non-zero exit status: 2
Files=2, Tests=46, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.07 cusr 0.01 csys = 0.13 CPU)
Result: FAIL
Failed 1/2 test programs. 2/46 subtests failed.
make: *** [test_dynamic] Error 2
GFUJI/UNIVERSAL-DOES-0.004.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports GFUJI/UNIVERSAL-DOES-0.004.tar.gz
Failed during this command:
GFUJI/UNIVERSAL-DOES-0.004.tar.gz : make_test NO
Is this the proper way to install it? Do I miss something? When I do sudo apt-get install perl I get that all are up to date.
The cpan module you're trying to install UNIVERSAL::DOES is specifically for versions of perl prior to v5.10 when DOES was added to Core: "UNIVERSAL::DOES()" in perl5100delta.
You can find the module and inspect it using:
perl -MUNIVERSAL -e 'print $INC{"UNIVERSAL.pm"}'
Outputs (on my system)
C:/strawberry/perl/lib/UNIVERSAL.pm
I'm trying to install perl from source into a local directory on CentOS 6. I'm having issues installing certain packages with cpan. I solved a bunch of problems by installing some dev rpm's, I solved more problems by telling perl CentOS is 64 bit in the configure line. But I'm having a problem installing Apache2::TaintRequest that I'm not having much luck figuring out. I've been googling and recompiling for the last several days, so hopefully this isn't a dumb question...
Here is what I'm doing.
yum -y install libxml2-devel openssl-devel vsftpd emacs alpine xorg-x11-xauth
yum -y xorg-x11-fonts* gd gd-devel expat mod_perl gdbm gdbm-devel httpd-devel
yum -y mod_ssl slang slang-devel expat expat-devel gmp gmp-devel curl
yum -y curl-devel jemalloc jemalloc-devel
mkdir /local_perl
cd /root/
wget http://www.cpan.org/src/5.0/perl-5.18.0.tar.gz
tar -xzxf /root/initial_install/perl-5.18.0.tar.gz
cd perl-5.18.0
CFLAGS='-m64 -mtune=nocona' ./Configure -des -A ccflags="-fPIC -m64" \
-Dprefix=/local_perl -Aldflags='-lresolv -lnsl -ldl -lm -lcrypt -lutil -lc'
make
make test
make install
/local_perl/bin/cpan
/local_perl/bin/cpan Bundle::CPAN
/local_perl/bin/cpan -i YAML
/local_perl/bin/cpan -i Net::OpenID::Consumer
/local_perl/bin/cpan -i Apache2::RequestRec
/local_perl/bin/cpan -i Apache2::TaintRequest # fails
This is where I've gotten, here's the output
[STL root#mgs26 perl-5.18.0]# /local_perl/bin/cpan -i Apache2::TaintRequest #
CPAN: Storable loaded ok (v2.41)
Reading '/root/.cpan/Metadata'
Database was generated on Mon, 12 Aug 2013 19:53:03 GMT
Running install for module 'Apache2::TaintRequest'
Running make for P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz
CPAN: Digest::SHA loaded ok (v5.85)
CPAN: Compress::Zlib loaded ok (v2.062)
Checksum for /root/.cpan/sources/authors/id/P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz ok
CPAN: File::Temp loaded ok (v0.2301)
CPAN: Parse::CPAN::Meta loaded ok (v1.4405)
CPAN: CPAN::Meta loaded ok (v2.120921)
CPAN: Module::CoreList loaded ok (v2.90)
CPAN.pm: Building P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz
Checking if your kit is complete...
Looks good
Warning: prerequisite Taint 0 not found.
Writing Makefile for Apache2::TaintRequest
Writing MYMETA.yml and MYMETA.json
---- Unsatisfied dependencies detected during ----
---- PHRED/Apache2-TaintRequest-0.01.tar.gz ----
Taint [requires]
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'Taint'
Running make for P/PH/PHOENIX/Taint-0.09.tar.gz
Checksum for /root/.cpan/sources/authors/id/P/PH/PHOENIX/Taint-0.09.tar.gz ok
CPAN.pm: Building P/PH/PHOENIX/Taint-0.09.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Taint
Writing MYMETA.yml and MYMETA.json
cp Taint.pm blib/lib/Taint.pm
Manifying blib/man3/Taint.3
PHOENIX/Taint-0.09.tar.gz
/usr/bin/make -- OK
CPAN: YAML loaded ok (v0.84)
Running make test
PERL_DL_NONLAZY=1 /local_perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/0-basic.t .... Failed 4/52 subtests
t/no-taint.t ... ok
t/tied.t ....... All 11 subtests passed
t/u-untaint.t .. ok
Test Summary Report
-------------------
t/0-basic.t (Wstat: 0 Tests: 52 Failed: 4)
Failed tests: 32, 38-40
t/tied.t (Wstat: 0 Tests: 12 Failed: 1)
Failed test: 12
Parse errors: Bad plan. You planned 11 tests but ran 12.
Files=4, Tests=78, 0 wallclock secs ( 0.07 usr 0.02 sys + 0.07 cusr 0.04 csys = 0.20 CPU)
Result: FAIL
Failed 2/4 test programs. 5/78 subtests failed.
make: *** [test_dynamic] Error 255
PHOENIX/Taint-0.09.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports PHOENIX/Taint-0.09.tar.gz
Running make install
make test had returned bad status, won't install without force
Running make for P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz
Has already been unwrapped into directory /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt
CPAN.pm: Building P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz
Warning: Prerequisite 'Taint => 0' for 'PHRED/Apache2-TaintRequest-0.01.tar.gz' failed when processing 'PHOENIX/Taint-0.09.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited.
CPAN: Time::HiRes loaded ok (v1.9725)
cp lib/Apache2/TaintRequest.pm blib/lib/Apache2/TaintRequest.pm
Manifying blib/man3/Apache2::TaintRequest.3
PHRED/Apache2-TaintRequest-0.01.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /local_perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Apache2-TaintRequest.t .. 1/1
# Failed test 'use Apache2::TaintRequest;'
# at t/Apache2-TaintRequest.t line 7.
# Tried to use 'Apache2::TaintRequest'.
# Error: Can't locate Taint.pm in #INC (you may need to install the Taint module) (#INC contains: /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt/blib/lib /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt/blib/arch /local_perl/lib/site_perl/5.18.0/x86_64-linux /local_perl/lib/site_perl/5.18.0 /local_perl/lib/5.18.0/x86_64-linux /local_perl/lib/5.18.0) at /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt/blib/lib/Apache2/TaintRequest.pm line 29.
# BEGIN failed--compilation aborted at /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt/blib/lib/Apache2/TaintRequest.pm line 29.
# Compilation failed in require at (eval 4) line 2.
# BEGIN failed--compilation aborted at (eval 4) line 2.
# Looks like you failed 1 test of 1.
t/Apache2-TaintRequest.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
Test Summary Report
-------------------
t/Apache2-TaintRequest.t (Wstat: 256 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 1
Files=1, Tests=1, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.04 cusr 0.01 csys = 0.10 CPU)
Result: FAIL
Failed 1/1 test programs. 1/1 subtests failed.
make: *** [test_dynamic] Error 1
PHRED/Apache2-TaintRequest-0.01.tar.gz
one dependency not OK (Taint); additionally test harness failed
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports PHRED/Apache2-TaintRequest-0.01.tar.gz
Running make install
make test had returned bad status, won't install without force
I'm at a loss, any help would be greatly appreciated. Thanks.
Have you seen if perlbrew sets the right flags and just works?
Force install the Taint module first:
cpan[1]> force install Taint
Then: cpan Apache2::TaintRequest
I'm struggling for two days now to get the PAR::Packer module installed. I'm new to CPAN, and this is the first module I want to install, so I first thought it is me. But I reinstalled strawberry Perl a few times now and also used an older versions. The installation always fails with:
windres: unexpected version string length 68 != 32 + 8
I found a few hits on this string and it appears to be an issue with MingW (whatever this is):
http://mingw.5.n7.nabble.com/Wine-crosstest-build-fails-with-quot-unexpected-version-string-length-68-32-8-quot-td29953.html#a29975
But I do not know how to get this patch and how to install it.
Below the hole capture of the installation:
C:\Documents and Settings\shepp>cpan PAR::Packer CPAN: CPAN::SQLite
loaded ok (v0.202) Database was generated on Tue, 27 Nov 2012 20:58:53
GMT Running install for module 'PAR::Packer' Running make for
R/RS/RSCHUPP/PAR-Packer-1.013.tar.gz CPAN: LWP::UserAgent loaded ok
(v6.04) CPAN: Time::HiRes loaded ok (v1.9725) Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/R/RS/RSCHUPP/PAR-Packer-1.013.tar.gz
CPAN: YAML::XS loaded ok (v0.38) CPAN: Digest::SHA loaded ok (v5.72)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/R/RS/RSCHUPP/CHECKSUMS CPAN:
Compress::Zlib loaded ok (v2.055) Checksum for
C:\strawberry\cpan\sources\authors\id\R\RS\RSCHUPP\PAR-Packer-1.013
.tar.gz ok CPAN: Archive::Tar loaded ok (v1.90) CPAN: File::Temp
loaded ok (v0.22) CPAN: Parse::CPAN::Meta loaded ok (v1.4404) CPAN:
CPAN::Meta loaded ok (v2.120921) CPAN: Module::CoreList loaded ok
(v2.74)
CPAN.pm: Building R/RS/RSCHUPP/PAR-Packer-1.013.tar.gz
Checking if your kit is complete... Looks good Warning: prerequisite
Getopt::ArgvFile 1.07 not found. Warning: prerequisite
Module::ScanDeps 1.05 not found. Prototype mismatch: sub main::prompt:
none vs ($;$) at C:/strawberry/perl/lib/Ex tUtils/MakeMaker.pm line
219. Writing Makefile for par.exe Writing MYMETA.yml and MYMETA.json Writing Makefile for PAR::Packer Writing MYMETA.yml and MYMETA.json
---- Unsatisfied dependencies detected during ----
---- RSCHUPP/PAR-Packer-1.013.tar.gz ----
Getopt::ArgvFile [requires]
Module::ScanDeps [requires] Running make test Delayed until after prerequisites Running make install Delayed until after
prerequisites Running install for module 'Getopt::ArgvFile' Running
make for J/JS/JSTENZEL/Getopt-ArgvFile-1.11.tar.gz Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/J/JS/JSTENZEL/Getopt-ArgvFile-1.11.tar
.gz Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/J/JS/JSTENZEL/CHECKSUMS
Checksum for
C:\strawberry\cpan\sources\authors\id\J\JS\JSTENZEL\Getopt-ArgvFile
-1.11.tar.gz ok
CPAN.pm: Building J/JS/JSTENZEL/Getopt-ArgvFile-1.11.tar.gz
Checking if your kit is complete... Looks good Writing Makefile for
Getopt::ArgvFile Writing MYMETA.yml and MYMETA.json cp ArgvFile.pm
blib\lib\Getopt\ArgvFile.pm JSTENZEL/Getopt-ArgvFile-1.11.tar.gz
C:\strawberry\c\bin\dmake.exe -- OK Running make test
C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/base.t ...........
ok t/expandenv.t ...... ok t/fileopt.t ........ ok t/noHOMEvar.t
...... ok t/pod-coverage.t ... skipped: Test::Pod::Coverage 1.00
required for testing POD coverage t/pod.t ............ skipped:
Test::Pod 1.00 required for testing POD t/prefix.t ......... ok
t/resolvepathes.t .. ok t/use1.t ........... ok t/use2.t ...........
ok All tests successful. Files=10, Tests=43, 3 wallclock secs ( 0.08
usr + 0.09 sys = 0.17 CPU) Result: PASS
JSTENZEL/Getopt-ArgvFile-1.11.tar.gz C:\strawberry\c\bin\dmake.exe
test -- OK Running make install Installing
C:\strawberry\perl\site\lib\Getopt\ArgvFile.pm Appending installation
info to C:\strawberry\perl\lib/perllocal.pod
JSTENZEL/Getopt-ArgvFile-1.11.tar.gz C:\strawberry\c\bin\dmake.exe
install UNINST=1 -- OK Running install for module 'Module::ScanDeps'
Running make for R/RS/RSCHUPP/Module-ScanDeps-1.10.tar.gz Fetching
with LWP:
http://cpan.strawberryperl.com/authors/id/R/RS/RSCHUPP/Module-ScanDeps-1.10.tar.
gz Checksum for
C:\strawberry\cpan\sources\authors\id\R\RS\RSCHUPP\Module-ScanDeps-
1.10.tar.gz ok
CPAN.pm: Building R/RS/RSCHUPP/Module-ScanDeps-1.10.tar.gz
Checking if your kit is complete... Looks good Writing Makefile for
Module::ScanDeps Writing MYMETA.yml and MYMETA.json 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
C:\strawberry\perl\bin\perl.exe "-Iinc" -MExtUtils::Command -e cp --
script/scan deps.pl blib\script\scandeps.pl pl2bat.bat
blib\script\scandeps.pl RSCHUPP/Module-ScanDeps-1.10.tar.gz
C:\strawberry\c\bin\dmake.exe -- OK Running make test
C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/*.t t/0-pod.t
....................................... skipped: Test::Pod 1.00 requir
ed for testing POD t/1-static_functional_interface_real.t ..........
ok t/10-case-insensitive-keys.t .................... ok
t/12-ScanFileRE.t ............................... ok
t/13-static_prefork_test.t ...................... skipped: This test
requires pr efork.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 tes t: Cwd
File::Glob Data::Dumper List::Util Time::HiRes Compress::Raw::Zlib
t/7-check-dynaloader.t .......................... 1/36
C:\DOCUME~1\shepp\LOCALS~ 1\Temp\5xtWJc0E06 syntax OK
C:\DOCUME~1\shepp\LOCALS~1\Temp\JzIXUYCKFa syntax OK
t/7-check-dynaloader.t .......................... 11/36
C:\DOCUME~1\shepp\LOCALS ~1\Temp\jGWh6j7CQ_ syntax OK
C:\DOCUME~1\shepp\LOCALS~1\Temp\vHQnTPJrl3 syntax OK
t/7-check-dynaloader.t .......................... 21/36
C:\DOCUME~1\shepp\LOCALS ~1\Temp\4nv64Rabo3 syntax OK
t/7-check-dynaloader.t .......................... 29/36
C:\DOCUME~1\shepp\LOCALS ~1\Temp\tX8ukeJjGy 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=17352, 67 wallclock secs ( 1.89 usr +
0.22 sys = 2.11 CPU) Result: PASS RSCHUPP/Module-ScanDeps-1.10.tar.gz C:\strawberry\c\bin\dmake.exe
test -- OK Running make install Installing
C:\strawberry\perl\site\lib\Module\ScanDeps.pm Installing
C:\strawberry\perl\site\lib\Module\ScanDeps\Cache.pm Installing
C:\strawberry\perl\site\lib\Module\ScanDeps\DataFeed.pm Installing
C:\strawberry\perl\site\bin\scandeps.bat Installing
C:\strawberry\perl\site\bin\scandeps.pl Appending installation info to
C:\strawberry\perl\lib/perllocal.pod
RSCHUPP/Module-ScanDeps-1.10.tar.gz C:\strawberry\c\bin\dmake.exe
install UNINST=1 -- OK Running make for
R/RS/RSCHUPP/PAR-Packer-1.013.tar.gz Has already been unwrapped into
directory C:\strawberry\cpan\build\PAR-Packer-
1.013-PEitq2
CPAN.pm: Building R/RS/RSCHUPP/PAR-Packer-1.013.tar.gz
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/Obfuscate.pm blib\lib\PAR\Filter\Obfuscate.pm cp
lib/PAR/Filter/PodStrip.pm blib\lib\PAR\Filter\PodStrip.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 C:\strawberry\perl\bin\perl.exe
file2c.pl -s ..\script\par.pl my_par_pl.c load_m y_par_pl
C:\strawberry\perl\bin\perl.exe sha1.c.PL gcc -c -s -O2 -DWIN32
-DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IM PLICIT_SYS -fno-strict-aliasing -mms-bitfields -I"C:\strawberry\perl\lib\CORE" -DLOAD_MY_LIBGCC -DPARL_EXE=\"parl.exe\" -s -O2 main.c windres -F pei-i386 -i winres\pp.rc -o winres\pp.res windres -o ppresource.coff
winres\pp.res windres: unexpected version string length 68 != 32 + 8
dmake: Error code 129, while making 'ppresource.coff' dmake.exe:
Error code 255, while making 'subdirs'
RSCHUPP/PAR-Packer-1.013.tar.gz C:\strawberry\c\bin\dmake.exe -- NOT
OK Running make test Can't test without successful make Running make
install Make had returned bad status, install seems impossible
Stopping: 'install' failed for 'R/RS/RSCHUPP/PAR-Packer-1.013.tar.gz'.
Bug #77408 for PAR-Packer: Cannot build on Win64/Perl64
update: Strawberryperl/Dwimperl uses the MinGW compiler, and the above bug report includes a patch for this issue
I finally got it working using the patched version of PAR:Packer :
http://strawberryperl.com/package/kmx/perl-modules-patched/PAR-Packer-1.013_patched.tar.gz
Thanks
Siegfried