码迷,mamicode.com
首页 > 其他好文 > 详细

cpan安装报错Invalid host name on line 1 at *FirstTime.pm line 1857.

时间:2015-04-12 20:38:20      阅读:1339      评论:0      收藏:0      [点我收藏+]

标签:

今天鼓捣一下CPAN,安装时出错:

root@ubuntu:~# cpan install DBI

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]

Would you like me to automatically choose some CPAN mirror
sites for you? (This means connecting to the Internet) [yes]
Invalid host name on line 1 at /usr/share/perl/5.18/CPAN/FirstTime.pm line 1857.

 

分析原因,看1857是找Mirrors,但是因为之前网络出错加载Mirrors列表是空的,而Mirrors列表优先使用了Cache;

 

解决方法,手工选择一个Mirrors,或是等待加载完了Mirrors列表再执行一次安装,如下图:

技术分享

 

cpan安装报错Invalid host name on line 1 at *FirstTime.pm line 1857.

标签:

原文地址:http://www.cnblogs.com/scue/p/4420291.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!