apt-get: Could not resolve 'archive.ubuntu.com'
2015-03-19 14:38
447 查看
最近在搭建 Vagrant 服务器的时候, 使用
sudo apt-get update的时候出现了访问错误
Err http://archive.ubuntu.com trusty InRelease Err http://archive.ubuntu.com trusty-updates InRelease Err http://security.ubuntu.com trusty-security InRelease Err http://archive.ubuntu.com trusty Release.gpg Could not resolve 'archive.ubuntu.com' Err http://security.ubuntu.com trusty-security Release.gpg Could not resolve 'security.ubuntu.com' Err http://archive.ubuntu.com trusty-updates Release.gpg Could not resolve 'archive.ubuntu.com' Reading package lists... Done W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease[/code] 使用ping www.baidu.com发现可以返回数据, 但是ping archive.Ubuntu.com则没有反应, host 机器是有访问返回的.
修正方法是:
step 1: 修改host/etc/hosts
添加如下映射91.189.91.93 archive.ubuntu.com 91.189.91.93 security.ubuntu.com
step 2: 重启network服务$ /etc/init.d/networking restart
相关文章推荐
- Ubuntu apt-get install 问题: Could not resolve 'cn.archive.ubuntu.com'
- apt-get: Could not resolve 'archive.ubuntu.com'解决方法
- apt-get: Could not resolve 'archive.ubuntu.com'
- Ubuntu apt-get install 问题: Could not resolve 'cn.archive.ubuntu.com'
- apt-get: Could not resolve 'archive.ubuntu.com'
- Ubuntu下的Ubuntu虚拟机--源配置问题:apt-get update 显示could not resolve 'mirrors.163.com'
- ubuntu apt-get 解锁:Could not get lock /var/lib/apt/lists/lock
- ubuntu下sudo apt-get update出错:E: Could not get lock /var/lib/apt/lists/lock - open……
- 在Ubuntu中,有时候运用sudo apt-get install 安装软件时,会出现一下的情况 E: Could not get lock /var/lib/dpkg/lock - open
- unbutu sudo apt-get install git 和 apt-get update时报 暂时不能解析域名“ archive.ubuntu.com” 安装失败
- 关于Ubuntu中执行apt-get和get出现Could not get lock /var/lib/dpkg/lock解决方案
- ubuntu系统刚安装结束时运行apt-get出现error:could not get lock /var/apt/lists/lock
- 在使用apt-get update 时更行列表,显示[Connecting to archive.ubuntu.com (2001:67c:1360:8001::21)]超时
- [Ubuntu] Solution: "E: Could Not Get Lock /var/lib/apt/lists/lock"
- ubuntu常见错误--Could not get lock /var/lib/dpkg/lock解决 通过终端安装程序sudo apt-get install xxx时出错: E: Coul
- Ubuntu Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
- Ubuntu apt-get 故障:Could not get lock
- Ubuntu使用apt-get install下载安装一些软件包的时候连接不到cn.archive.ubuntu.com
- apt-get update --> Bad header line (fresh install) Ign http://archive.ubuntu.com natty-security/multiverse Sources/DiffIndex W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/Rele
- Ubuntu上出现无法获得锁“Could not get lock /var/lib/apt/lists/lock”问题的解决