2017-03-06 186 views
1

我有幾個perl安裝與各種conda環境一起出現。因爲我現在用的工具,這個人是無法訪問Perl模塊URI::Escape安裝URI時遇到問題::轉義

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 

URI出現問題::使用我的工具使用的perl安裝逃脫:

$ /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

您是否安裝了URI :: Escape? – simbabque

+0

@simbabque我誤解了我的錯誤,但我對這個問題進行了編輯 –

+1

'old-base.t'中的第四項測試對我來說看起來是錯誤的。只要沒有其他測試失敗,我就會強制安裝。 – Borodin

回答

0

perl二進制的每個安裝應該有cpan相應的安裝。要安裝一個/home/rathik/tools/miniconda3/bin/perl可見的模塊,請使用/home/rathik/tools/miniconda3/bin/cpan進行安裝。

+0

這可能無法回答這個問題,但我會把它作爲一般提示留在這裏。 – mob

+0

我曾嘗試使用'/ home/rathik/tools/miniconda3/bin/cpan URI :: Escape',但仍顯示相同的錯誤。 –