Perl 使用cpan命令行时出错

Perl 使用cpan命令行时出错,perl,cpan,activeperl,Perl,Cpan,Activeperl,使用cpan命令行时出现以下错误: Reading 'C:\Perl64\cpan\sources\modules\02packages.details.txt.gz' Warning: Your C:\Perl64\cpan\sources\modules\02packages.details.txt.gz does not contain a Line-Count header. Please check the validity of the index file by comparing

使用cpan命令行时出现以下错误:

Reading 'C:\Perl64\cpan\sources\modules\02packages.details.txt.gz'
Warning: Your C:\Perl64\cpan\sources\modules\02packages.details.txt.gz does not
contain a Line-Count header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
CPAN: Time::HiRes loaded ok (v1.9741)
Warning: Your C:\Perl64\cpan\sources\modules\02packages.details.txt.gz does not
contain a Last-Updated header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
........Could not split line["            return \"DIRECT\";"]
Could not split line[""]
........Could not split line["            return \"DIRECT\";"]
Could not split line[""]
Giving up parsing your C:\Perl64\cpan\sources\modules\02packages.details.txt.gz,
 too many errors
我试图在命令提示符下使用cpan App::cpanminus命令安装cpanm

我在防火墙后面,并且在http_proxy env变量中配置了pac文件。我正在使用ActivePerl。

代码>返回“DIRECT”是您在代理配置文件中经常看到的内容,因此在正确设置代理之前,您可能会将其下载到
02packages.details.txt.gz

确定代理设置正确后,删除此文件并再次运行
cpan
。然后,
cpan
将下载包文件的新副本


一旦你确定你的代理设置正确

cpan
具有可能需要配置的代理设置,以使其正常工作。 从cpan提示符运行
o conf/proxy/
,查看它们

例如,在我的工作机器上,我有设置

http_proxy     [http://proxymachine.mycompany.com:82]
no_proxy       [localhost,127.0.0.1,internalsite.mycompany.com]

我只在env变量中进行了代理设置,没有在任何perl配置文件中进行设置。这个错误可能是由这个引起的吗?当我试图删除这个文件时,下载的文件也会抛出同样的错误。你在conf文件和env变量中都做了设置吗?salso cpan没有使用我的本地home配置,我想当我调用cpa时,任何人都会遇到同样的问题吗?我仍然面临这个问题。