我有几个与各种conda环境一起出现的perl安装。由于这个我正在使用的工具之一无法访问PERL模块URI::Escape
:
用于测试模块安装的Perl脚本:
$ cat test.pl
use Set::IntervalTree;
use DB_File;
use URI::Escape;
当前正在使用的perl工作正常:
$ which perl
/home/rathik/tools/miniconda3/envs/rnaseq-env/bin/perl
$ perl test.pl # runs okay
使用我的工具使用的perl安装来解决URI :: Escape问题:
$ /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.
当我尝试安装它时,会抛出此错误:
# 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
我可以使用当前的perl安装URI::Escape
,但不能使用我的工具正在使用的perl。我该如何解决冲突?
CPAN安装日志:
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
答案 0 :(得分:0)
perl
二进制文件的每次安装都应具有cpan
的相应安装。要安装/home/rathik/tools/miniconda3/bin/perl
可见的模块,请使用/home/rathik/tools/miniconda3/bin/cpan
安装。