2

尝试安装一些模块并出现错误,这似乎与 .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
4

2 回答 2

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 或更高版本(以及它可能具有的任何依赖项)。

于 2013-06-17T00:27:29.657 回答
1

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

于 2013-06-17T13:39:53.600 回答