Ubuntu 更换国内软件源,解决unable to locate package问题

2018-11-15 11:51:30  阅读 22491 次 评论 0 条

以前记得直接在系统的软件中心里选择163或sohu的源就可以用了,但是今天却不行了,安装很多软件时提示 unable to locate package。

手动更换了阿里的软件源就顺畅了,速度也很快。

方法:

备份原文件

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

使用gedit打开,vi操作不太习惯

sudo gedit sudo cp /etc/apt/sources.list

全删掉,将下列内容复制进去,保存退出

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

更新源

sudo apt-get update

本文地址:http://bloguan.com/?id=463
版权声明:本文为原创文章,版权归 博观网 所有,欢迎分享本文,转载请保留出处!

发表评论


表情

还没有留言,还不快点抢沙发?