Ubuntu换国内源后apt-get update失败

在学习Linux操作系统时,我们不免要安装一些Linux操作系统,Ubuntu作为一个重要的操作系统,被许多人青睐

大多数人在安装Ubuntu之后,都会将Ubuntu的软件源更换为国内源(阿里源、网易源)

但是,更新之后有的人就会遇到各种问题,例如:大量的"Failed to fetech"

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/main/binary-i386/Packages Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/binary-i386/Packages Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/universe/binary-i386/Packages Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/binary-i386/Packages Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/main/i18n/Translation-en_US Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)

网上也有大量的解决教程,但是我遇到这种情况是因为Ubuntu版本的问题

在更换Ubuntu源的时候,参考的教程为Ubuntu 16,自己安装的为Ubuntu 12,因此出现了以上问题

在更换为Ubuntu 12的软件源之后,问题解决

Ubuntu在换源的时候一定要按照自己的版本参考相应教程,否则会发生很多奇怪的问题

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值