Ubuntu apt-get install 问题: Could not resolve 'cn.archive.ubuntu.com'
来源:互联网 发布:软件开发教程 编辑:程序博客网 时间:2024/04/27 23:54
问题描述:
今天使用Ubuntu 安装Ctags 时,遇见以下问题:
sudo apt-get install ctags
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'exuberant-ctags' instead of 'ctags'
The following NEW packages will be installed:
exuberant-ctags
0 upgraded, 1 newly installed, 0 to remove and 356 not upgraded.
Need to get 133 kB of archives.
After this operation, 308 kB of additional disk space will be used.
Err http://cn.archive.ubuntu.com/ubuntu/ saucy/main exuberant-ctags i386 1:5.9~svn20110310-6
Could not resolve 'cn.archive.ubuntu.com'
Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/main/e/exuberant-ctags/exuberant-ctags_5.9~svn20110310-6_i386.deb Could not resolve 'cn.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
解决方法:
从Error Message 上看来似乎是“cn.archive.ubuntu.com”域名解析出错。于是在Terminal 里Ping了一下这个域名,发现可以Ping 通。
ping cn.archive.ubuntu.com
PING mirror.neu.edu.cn (202.118.1.64) 56(84) bytes of data.
64 bytes from ftp2.neu.edu.cn (202.118.1.64): icmp_seq=1 ttl=45 time=86.3 ms
64 bytes from ftp2.neu.edu.cn (202.118.1.64): icmp_seq=2 ttl=45 time=100 ms
64 bytes from ftp2.neu.edu.cn (202.118.1.64): icmp_seq=3 ttl=45 time=86.8 ms
于是尝试通过修改 /etc/hosts 解决这个问题:
- vi /etc/hosts
- 在文件末尾加入 “202.118.1.64 cn.archive.ubuntu.com”。
- 运行 “#/etc/init.d/networking restart” 重启网络。
- 运行 “sudo apt-get install ctags” 重新安装Ctags,成功!!!
0 0
- Ubuntu apt-get install 问题: Could not resolve 'cn.archive.ubuntu.com'
- 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'
- apt-get: Could not resolve 'archive.ubuntu.com'解决方法
- Ubuntu下的Ubuntu虚拟机--源配置问题:apt-get update 显示could not resolve 'mirrors.163.com'
- apt-get update 失败 ubuntu:Tempory failure resolving 'cn.archive.ubuntu.com ubuntu
- 如何解决虚拟机上Ubuntu could not resolve 'us.archive.ubuntu.com'的错误
- apt-get update报“failure resolving 'archive.ubuntu.com'”
- ubuntu 12.10无法用apt-get安装软件 Err http://us.archive.ubuntu.com quantal-updates/main Sources 404 Not
- Ubuntu apt-get 故障:Could not get lock
- ubuntu中运行 sudo apt-get update 报错:W: GPG error: http://cn.archive.ubuntu.com vivid Release: The follo
- ubuntu apt-get install 源
- Ubuntu apt-get install命令
- Ubuntu apt-get install source
- Ubuntu Could not get lock /var/lib/apt/lists/lock
- ubuntu:apt-get问题
- ubuntu apt-get 错误 Temporary failure resolving 'us.archive.ubuntu.com' 解决
- 推荐十款强大的Web服务器及客户端软件
- LeapFTP的软件教程
- log4j配置详解
- Foundation框架基础 NSMutableArray-可变数组
- maven 镜像,仓库配置
- Ubuntu apt-get install 问题: Could not resolve 'cn.archive.ubuntu.com'
- 《c++ primer》 第11章 关联容器 学习笔记
- hdu--5055 Bob and math problem
- PUTTY远程登录Linux从零配置
- git常用命令详解
- 话说农村卖土地出台了补偿标准,这是我听过最不靠谱的事情了
- android基础笔记——真正destroy掉activity的方法
- linux系统管理常用命令(不定时更新)
- sql 插入数据库