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

今天鼓捣一下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列表再执行一次安装,如下图:

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值