使用cpan命令行时出错 [英] Error while using cpan command line
问题描述
在使用cpan命令行时出现以下错误:
I am getting the below errors while using cpan command line:
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。
I was trying to install cpanm using cpan App::cpanminus command in command prompt.
我在防火墙后面,并且还在http_proxy env变量中配置了pac文件。我正在使用ActivePerl。
I am behind a firewall and have configured the pac file in the http_proxy env variable also. I am using ActivePerl.
推荐答案
返回直接;
您经常会在代理配置文件中看到该文件,因此可能是在正确设置代理之前下载到 02packages.details.txt.gz
的文件。
return "DIRECT";
is something you will often see in a proxy configuration file, so that's what you probably downloaded into 02packages.details.txt.gz
before your proxy was set up correctly.
确定代理设置正确后,请删除此文件,然后再次运行 cpan
。然后 cpan
将下载打包文件的新副本。
Once you're sure that your proxy is set up correctly, delete this file and run cpan
again. Then cpan
will download a fresh copy of the package file.
一旦确定代理设置正确...
Once you're sure that your proxy is set up correctly ...
cpan
具有可能需要配置的代理设置才能使此功能正常运行。
在cpan提示符下运行 o conf / proxy /
来查看它们。
cpan
has proxy settings that may need to be configured to get this working.
Run o conf /proxy/
from the cpan prompt to see them.
在我的工作机上,例如,我有以下设置
On my work machine, for example, I have the settings
http_proxy [http://proxymachine.mycompany.com:82]
no_proxy [localhost,127.0.0.1,internalsite.mycompany.com]
这篇关于使用cpan命令行时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!