Ubuntu不能用apt-get更新,软件源更新(非LTS长久支持版)

来源:互联网 发布:广州网络远程教育 编辑:程序博客网 时间:2024/06/08 14:10

目前Ubutun版本更新迭代太快~常规版本的维护期都比较短,基本一年以内,只有像10.04,12.04,14.04还有以后的16.04才会长久支持3-5年。

去年装的最新13.04 已经停止维护好几个月了,之前发现没更新也没管,后面想装某些软件的时候才发现源已无效!

折腾了半天才找到办法,所有停止维护的版本都可以使用old源。

撰写不易,转载请注明出处:http://blog.csdn.net/jscese/article/details/39010273

1、首先备份Ubuntu 11.04源列表

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份下当前的源列表,有备无患嘛)

2、修改/etc/apt/sources.list

$sudo gedit /etc/apt/sources.list

把所有源的地址换成 http://old-releases.ubuntu.com/ubuntu ,注意不要把后面的系统版本和分类删了。

deb http://old-releases.ubuntu.com/ubuntu raring main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu raring-security main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu raring-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu raring-proposed main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu raring-backports main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu raring main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu raring-security main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu raring-updates main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu raring-proposed main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu raring-backports main restricted universe multiverse

可以看到网址全部为 http://old-releases.ubuntu.com/ubuntu ,其中每行的raring 为版本代号,13.04 代号为 raring !

其它版本的可以copy上面的源覆盖原有的sources.list 然后 改成自己对应的版本代号。

sudo apt-get update
   sudo pat-get upgrade

更新系统~

0 0
原创粉丝点击