cpanm不使用.gz文件

时间:2013-06-16 07:32:51

标签: 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

2 个答案:

答案 0 :(得分:1)

显然需要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或更高(以及它可能具有的任何依赖性)。

答案 1 :(得分:1)

似乎cpanm也可以使用Archive::Tar。因此,如果您手动安装Archive::Tar,然后使用cpanm安装任何其他模块,您可能有机会。