gpt4 book ai didi

perl - 所有 CPAN 镜像都不能在 CPAN 配置中工作?

转载 作者:行者123 更新时间:2023-12-02 15:25:50 27 4
gpt4 key购买 nike

我正在尝试在 Centos 6 上安装和配置 CPAN。

我在配置中收到此消息:

CPAN.pm requires configuration, but most of it can be done automatically. If you answer 'no' below, you will enter an interactive dialog for each configuration option instead. Would you like to configure as much as possible automatically? [yes]

我选择了是,然后系统提示我这条消息:

Autoconfigured everything but 'urllist'. Now you need to choose your CPAN mirror sites. You can let me pick mirrors for you, you can select them from a list or you can enter them by hand. Would you like me to automatically choose some CPAN mirror sites for you? (This means connecting to the Internet) [yes]

我还选择了是来接收该消息:

Trying to fetch a mirror list from the Internet Fetching with LWP: http://www.perl.org/CPAN/MIRRORED.BY Fetching with LWP: http://www.perl.org/CPAN/MIRRORED.BY.gz Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz Fetching with Net::FTP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Could not connect to host 'ftp.perl.org' with Net::FTP Fetching with Net::FTP ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz Could not connect to host 'ftp.perl.org' with Net::FTP

Trying with /usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459" to get http://www.perl.org/CPAN/MIRRORED.BY --2015-05-25 16:39:15-- http://www.perl.org/CPAN/MIRRORED.BY Resolving www.perl.org... 108.161.188.196 Connecting to www.perl.org|108.161.188.196|:80... failed: No route to host.

Function system("/usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459"

"http://www.perl.org/CPAN/MIRRORED.BY" ") returned status 4 (wstat 1024), left /home/abashir/.cpan/sources/MIRRORED.BY.tmp33459 with size 0

Trying with /usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459" to get ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY --2015-05-25 16:39:15-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY => “/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459” Resolving ftp.perl.org... 130.161.131.20, 131.211.32.146 Connecting to ftp.perl.org|130.161.131.20|:21... failed: No route to host. Connecting to ftp.perl.org|131.211.32.146|:21... failed: No route to host.

Function system("/usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459"

"ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY" ") returned status 4 (wstat 1024), left /home/abashir/.cpan/sources/MIRRORED.BY.tmp33459 with size 0 Warning: no success downloading '/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459'. Giving up on it. No external ftp command available

Fetching with LWP: http://www.perl.org/CPAN/MIRRORED.BY Fetching with LWP: http://www.perl.org/CPAN/MIRRORED.BY.gz

Trying with /usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459" to get http://www.perl.org/CPAN/MIRRORED.BY --2015-05-25 16:39:15-- http://www.perl.org/CPAN/MIRRORED.BY Resolving www.perl.org... 108.161.188.196 Connecting to www.perl.org|108.161.188.196|:80... failed: No route to host.

Function system("/usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459"

"http://www.perl.org/CPAN/MIRRORED.BY" ") returned status 4 (wstat 1024), left /home/abashir/.cpan/sources/MIRRORED.BY.tmp33459 with size 0 Warning: no success downloading '/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459'. Giving up on it. Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz Fetching with Net::FTP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Could not connect to host 'ftp.perl.org' with Net::FTP Fetching with Net::FTP ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz Could not connect to host 'ftp.perl.org' with Net::FTP

Trying with /usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459" to get ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY --2015-05-25 16:39:17-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY => “/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459” Resolving ftp.perl.org... 131.211.32.146, 130.161.131.20 Connecting to ftp.perl.org|131.211.32.146|:21... failed: No route to host. Connecting to ftp.perl.org|130.161.131.20|:21... failed: No route to host.

Function system("/usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459"

"ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY" ") returned status 4 (wstat 1024), left /home/abashir/.cpan/sources/MIRRORED.BY.tmp33459 with size 0 Warning: no success downloading '/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459'. Giving up on it. No external ftp command available

Your urllist is empty! The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'

Could not fetch MIRRORED.BY We failed to get a copy of the mirror list from the Internet. You will need to provide CPAN mirror URLs yourself.

Now you can enter your own CPAN URLs by hand. A local CPAN mirror can be listed using a 'file:' URL like 'file:///path/to/cpan/'

CPAN.pm needs at least one URL where it can fetch CPAN files from.

Please enter your CPAN site: []

然后我检查了perlmodlib中的镜像列表对于荷兰(我住的地方),我一一输入,配置终止如下。

Please enter your CPAN site: [] ftp://ftp.quicknet.nl/pub/CPAN/ Enter another URL or ENTER to quit: [] http://mirror.hostfuss.com/CPAN/ Enter another URL or ENTER to quit: [] ftp://mirror.hostfuss.com/CPAN/ Enter another URL or ENTER to quit: [] http://mirrors3.kernel.org/cpan/ Enter another URL or ENTER to quit: [] ftp://mirrors3.kernel.org/pub/CPAN/ Enter another URL or ENTER to quit: [] http://cpan.mirror.versatel.nl/ Enter another URL or ENTER to quit: [] ftp://ftp.mirror.versatel.nl/cpan/ Enter another URL or ENTER to quit: [] ftp://download.xs4all.nl/pub/mirror/CPAN/ Enter another URL or ENTER to quit: [] http://mirror.leaseweb.com/CPAN/ Enter another URL or ENTER to quit: [] ftp://mirror.leaseweb.com/CPAN/ Enter another URL or ENTER to quit: [] ftp://ftp.cpan.nl/pub/CPAN/ Enter another URL or ENTER to quit: [] http://archive.cs.uu.nl/mirror/CPAN/ Enter another URL or ENTER to quit: [] ftp://ftp.cs.uu.nl/mirror/CPAN/ Enter another URL or ENTER to quit: [] http://luxitude.net/cpan/ Enter another URL or ENTER to quit: []

New urllist
ftp://ftp.quicknet.nl/pub/CPAN/ http://mirror.hostfuss.com/CPAN/
ftp://mirror.hostfuss.com/CPAN/ http://mirrors3.kernel.org/cpan/
ftp://mirrors3.kernel.org/pub/CPAN/ http://cpan.mirror.versatel.nl/ ftp://ftp.mirror.versatel.nl/cpan/
ftp://download.xs4all.nl/pub/mirror/CPAN/
http://mirror.leaseweb.com/CPAN/ ftp://mirror.leaseweb.com/CPAN/
ftp://ftp.cpan.nl/pub/CPAN/ http://archive.cs.uu.nl/mirror/CPAN/
ftp://ftp.cs.uu.nl/mirror/CPAN/ http://luxitude.net/cpan/

Autoconfiguration complete.

commit: wrote '/home/abashir/.cpan/CPAN/MyConfig.pm'

You can re-run configuration any time with 'o conf init' in the CPAN shell

现在,每当我尝试安装任何模块时,都会出现错误,例如尝试安装 XML::Simple ,我在试验结束时得到以下信息:

Please check, if the URLs I found in your configuration file (ftp://ftp.quicknet.nl/pub/CPAN/, http://mirror.hostfuss.com/CPAN/, ftp://mirror.hostfuss.com/CPAN/, http://mirrors3.kernel.org/cpan/, ftp://mirrors3.kernel.org/pub/CPAN/, http://cpan.mirror.versatel.nl/, ftp://ftp.mirror.versatel.nl/cpan/, ftp://download.xs4all.nl/pub/mirror/CPAN/, http://mirror.leaseweb.com/CPAN/, ftp://mirror.leaseweb.com/CPAN/, ftp://ftp.cpan.nl/pub/CPAN/, http://archive.cs.uu.nl/mirror/CPAN/, ftp://ftp.cs.uu.nl/mirror/CPAN/, http://luxitude.net/cpan/) are valid. The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'

Could not fetch authors/01mailrc.txt.gz Lockfile removed.

您可以查看 Full log最后一步 here

我该如何解决这个问题?

最佳答案

您似乎在代理后面。您必须在 CPAN shell 中配置代理:

o conf http_proxy 'http://user:password@proxy.com'

关于perl - 所有 CPAN 镜像都不能在 CPAN 配置中工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30441210/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com