[root@ip JESSE]# pwd /root/.cpan/sources/authors/id/J/JE/JESSE [root@ip JESSE]# ls -l total 240 -rw-r--r-- 1 root root 105464 Feb 20 11:39 CHECKSUMS -rw-r--r-- 1 root root 9223 Apr 12 2011 Locale-Maketext-Simple-0.21.tar.gz -rw-r--r-- 1 root root 125483 Feb 20 11:39 WWW-Mechanize-1.72.tar.gz [root@ip JESSE]# cpan -i WWW::Mechanize CPAN: Storable loaded ok (v2.20) Reading '/root/.cpan/Metadata' Database was generated on Mon,20 Feb 2012 11:10:26 GMT Running install for module 'WWW::Mechanize' Running make for J/JE/JESSE/WWW-Mechanize-1.72.tar.gz CPAN: Digest::SHA loaded ok (v5.61) CPAN: Compress::Zlib loaded ok (v2.033) Checksum for /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz ok CPAN: Archive::Tar loaded ok (v1.82) Uncompressed /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz successfully Using Tar:/bin/tar xvf "WWW-Mechanize-1.72.tar": Couldn't untar WWW-Mechanize-1.72.tar CPAN: File::Temp loaded ok (v0.22) CPAN: CPAN::Meta loaded ok (v2.112150) Package seems to come without Makefile.PL. (The test -f "/root/.cpan/build/JESSE-n72IRU/Makefile.PL" returned false.) Writing one on our own (setting NAME to WWWMechanize) Had problems unarchiving. Please build manually Running make test Make had some problems,won't test Running make install Make had some problems,won't install [root@ip JESSE]# ls -l total 240 -rw-r--r-- 1 root root 105464 Feb 20 11:39 CHECKSUMS -rw-r--r-- 1 root root 9223 Apr 12 2011 Locale-Maketext-Simple-0.21.tar.gz -rw-r--r-- 1 root root 125483 Feb 20 11:39 WWW-Mechanize-1.72.tar.gz [root@ip JESSE]# which tar /bin/tar [root@ip JESSE]# which gzip /bin/gzip
问题似乎在这里:
Uncompressed /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz successfully Using Tar:/bin/tar xvf "WWW-Mechanize-1.72.tar": Couldn't untar WWW-Mechanize-1.72.tar
tar.gz文件确实是未压缩的,可以在这里找到一个新的目录:
/root/.cpan/build/JESSE-KjCEMS/WWW-Mechanize-1.72.tar
如果我从shell里面运行相同的命令,我会得到一些更多的信息:
cpan[1]> install WWW::Mechanize CPAN: Storable loaded ok (v2.20) Reading '/root/.cpan/Metadata' Database was generated on Mon,20 Feb 2012 11:10:26 GMT Running install for module 'WWW::Mechanize' Running make for J/JE/JESSE/WWW-Mechanize-1.72.tar.gz CPAN: Digest::SHA loaded ok (v5.61) CPAN: Compress::Zlib loaded ok (v2.033) Checksum for /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz ok Scanning cache /root/.cpan/build for sizes Use of uninitialized value $newdir in substitution (s///) at /usr/lib64/perl5/Cwd.pm line 502. Use of uninitialized value $newdir in chdir at /usr/lib64/perl5/Cwd.pm line 510. Use of chdir('') or chdir(undef) as chdir() is deprecated at /usr/lib64/perl5/Cwd.pm line 510. Use of uninitialized value $newdir in pattern match (m//) at /usr/lib64/perl5/Cwd.pm line 525. Use of uninitialized value $newdir in split at /usr/lib64/perl5/Cwd.pm line 531. ..........................................................................--DONE DEL(1/10): /root/.cpan/build/CPAN-1.9600-jGTV10 DEL(2/10): /root/.cpan/build/File-Which-1.09-yoVWZC DEL(3/10): /root/.cpan/build/Test-Script-1.07-aJWrXb DEL(4/10): /root/.cpan/build/Probe-Perl-0.01-gzZ2eR DEL(5/10): /root/.cpan/build/IPC-Run3-0.044-AP6EMp DEL(6/10): /root/.cpan/build/Time-HiRes-1.9721-xxseE6 DEL(7/10): /root/.cpan/build/CPAN-Meta-YAML-0.003-wGtH0a DEL(8/10): /root/.cpan/build/JSON-PP-2.27105-fvkwNa DEL(9/10): /root/.cpan/build/Package-Constants-0.02-7Ms_OL DEL(10/10): /root/.cpan/build/Module-Metadata-1.000004-tXKIBB CPAN: Archive::Tar loaded ok (v1.82) Uncompressed /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz successfully Using Tar:/bin/tar xvf "WWW-Mechanize-1.72.tar": Couldn't untar WWW-Mechanize-1.72.tar CPAN: File::Temp loaded ok (v0.22) CPAN: CPAN::Meta loaded ok (v2.112150) Package seems to come without Makefile.PL. (The test -f "/root/.cpan/build/JESSE-DGrTh_/Makefile.PL" returned false.) Writing one on our own (setting NAME to WWWMechanize) Had problems unarchiving. Please build manually Running make test Make had some problems,won't install Failed during this command: JESSE/WWW-Mechanize-1.72.tar.gz : unwrapped NO -- untar Failed
在我看来,$newdir没有被动态生成的/root/.cpan/build/JESSE-DGrTh_/或/root/.cpan/build/JESSE-KjCEMS/或任何系统生成的东西或至少这些信息被更新没有得到tar命令
有没有人知道如何修复机制,而无需使用手动安装?
解决方法
我再次遇到这个问题.所有我需要做的都是释放一些像Keith Broughton所建议的记忆.
我遇到同样的问题,并试图找到这个问题的根本原因.我在这里列出我的发现,所以其他Google员工不必花费几个小时才放弃…
什么解决了我的只是重新启动系统.
我试过的东西
>升级CPAN.这也将失败,并显示“无法解压缩”错误消息.如果您尝试使用cpan shell,“cpan -i CPAN”或“perl -MCPAN -e”安装CPAN“,这并不重要.我没有想到任何这些都可以解决问题,但是当您开始搜索时,所有这些都是可能的解决方案.
>使用记录其输入的脚本替换tar,以便在调用时检查其中一个参数或cwd是否不正确.脚本从来没有被称为似乎.即使临时重命名/ bin / tar,“无法解密”的消息仍然是一样的.
>检查CPAN / Tarzip.pm,并在写入“无法解压缩”消息的代码附近添加打印行.似乎system()调用失败,tar(或调试代码中的ls)从未被调用.
然后我决定重新启动,这是一个选项,因为这不是一个现场系统.之后,问题消失了,首先尝试安装Perl模块.
其他意见:
>系统似乎工作正常,其余的.您仍然可以连接到系统,您可以编辑文件,修复仍然在重新启动后.在Perl系统()调用开始失败之前,我会期望其中的任何一个失败.>通过日志文件的快速扫描不显示任何红旗.