perl - cpanm 无法处理 .gz 文件

标签 perl cpan

尝试安装一些模块并收到错误,该错误似乎与 .gz 相关,但不太确定。任意线索

代码:

cpanm Digest::SHA1

日志:

! Failed to unpack Digest-SHA1-2.13.tar.gz: no directory
! Failed to fetch distribution Digest-SHA1-2.13

代码

cpanm -v Digest::SHA1

日志:

cpanm (App::cpanminus) 1.6920 on perl 5.008008 built for aix-thread-multi
Work directory is /export/home/ty/.cpanm/work/1371400956.36241464 
You have make /usr/bin/make
You have LWP 6.05
You have /usr/bin/tar:
You have /usr/bin/unzip
Checking if you have ExtUtils::MakeMaker 6.31 ... Yes (6.68)
Checking if you have ExtUtils::Install 1.46 ... Yes (1.54)
Searching Digest::SHA1 on cpanmetadb ...
--> Working on Digest::SHA1
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/Digest-SHA1-2.13.tar.gz ...
OK
Unpacking Digest-SHA1-2.13.tar.gz
Usage: tar -{c|r|t|u|x} [-BdDEFhilmopRUsvwZ ] [ -Number ] [ -f TarFile ]
           [ -b Blocks ] [ -S [ Feet ] | [ Feet@Density ] | [ Blocksb ] ]
           [ -L InputList ] [-X ExcludeFile] [ -N Blocks ] [ -C Directory ] File ...
Usage: tar {c|r|t|u|x} [bBdDEfFhilLXmNopRsSUvwZ[0-9] ] ]
           [ Blocks ] [ TarFile ] [ InputList ] [ ExcludeFile ]
           [ [ Feet ] | [ Feet@Density ] | [ Blocksb ] ] [-C Directory ] File ...
! Failed to unpack Digest-SHA1-2.13.tar.gz: no directory
! Failed to fetch distribution Digest-SHA1-2.13

最佳答案

它显然需要不同版本的tar。 (从外观上看,它带有 z 选项。)您始终可以在没有 cpanm 的情况下安装它。

mkdir work
cd work
wget http://www.cpan.org/authors/id/G/GA/GAAS/Digest-SHA1-2.13.tar.gz
gunzip -c Digest-SHA1-2.13.tar.gz | tar xv
cd Digest-SHA1-2.13
perl Makefile.PL
make test
make install
cd ../..
rm -rf work

但这意味着您需要自己安装依赖项。在本例中,这意味着 Digest::base 1.00 或更高版本(以及它可能具有的任何依赖项)。

关于perl - cpanm 无法处理 .gz 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17131134/

相关文章:

perl - 无法更改这些权限.CPAN

perl - 异常 : Please criticize my code 后重试操作

perl - 我怎样才能 'use' perl CPAN 模块的特定版本?

perl - 在 unix 上使用多个搜索条件搜索大型 CSV 文件

perl - Perl 的 && 的结果是什么?

perl - 有没有办法让操作系统在 CPAN 发行版中定义依赖项?

perl - 利用 Perl 操作 csv/分号数据

html - 你如何在 Perl 中处理格式错误的 HTML?

perl - 无法使用 cpan 在 darwin 13.0.1 上安装 GD 模块

html - 当输入允许时,如何防止对 html 实体进行双重编码