Ubuntu中输入apt-get找不到安装包怎么办?

今天租了一台阿里云ECS,在输入apt-get install mysql-client安装mysql-client时,终端却给我提醒404错误,找不到该软件包。
 
唉呀我去,心中一万头草泥马奔腾而过。根据我玩了一年的Linux经验来看,因为ECS到手了,自己太激动所以忘记了更新系统。
 
知道了问题的原因,解决起来就非常方便,于是我在终端输入:apt-get update。更新系统,更新完之后便成功安装了。
 
当然还有一种情况,也许你更新系统之后发现并没有什么卵用,这时你应该修改一下更新软件源:
 
vim /etc/apt/sources.list
 
#Ubuntu中文站
deb http://archive.ubuntu.org.cn/ubuntu dapper main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu dapper-security main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu dapper-updates main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu dapper-backports main universe multiverse restricted
deb http://archive.ubuntu.org.cn/ubuntu-cn dapper main universe multiverse restricted
deb http://archive.ubuntu.org.cn/ubuntu-cn breezy main universe multiverse restricted
 
因为我的系统是Ubuntu,所以我在这里只列举Ubuntu的软件源。
 
Ok,这样一来,应该能顺利的解决这个问题了!
 
来源:高小调博客
posted @ 2015-11-18 20:05  站长高小调  阅读(1497)  评论(0编辑  收藏  举报