关于老版本ubuntu源不能用的问题
在解决方向键为大写ABCD时安装vim 我的是Ubuntu 10.10 老版本
输入 sudo apt-get install vim 时出现 Package 'vim' has no installation candidate
解决此问题看了两个博客
http://blog.chinaunix.net/uid-26285146-id-3890490.html 这个最后解决了问题
http://blog.163.com/liuzhuqing_508/blog/static/606213512012111311532835/
E: Package 'vim' has no installation candidate
总体来说就是E:
Package 'packagename' has no installation candidate
update时发现报错
E: Some index files failed to download, they have been ignored, or old ones used instead.
想了想应该是不支持老版本ubuntu了,但是又不想在虚拟机装个12+以上的版本 ,遂寻找支持老版本的办法,发现一枚!
deb http://old-releases.ubuntu.com/ubuntu jaunty main restricted universe
将这一行粘帖到你的源文件中,即/etc/apt/sources.list
然后观察你第一行的代码,版本为maverick,将其替换jaunty 即 deb http://old-releases.ubuntu.com/ubuntu maverick main restricted universe
修改以后的源为(10.10,其他源修改类似)
- deb http://old-releases.ubuntu.com/ubuntu maverick main restricted universe
- #deb http://Ubuntu.uestc.edu.cn/ubuntu/ maverick main restricted universe multiverse
- deb http://Ubuntu.uestc.edu.cn/ubuntu/ maverick-backports main restricted universe multiverse
- deb http://Ubuntu.uestc.edu.cn/ubuntu/ maverick-proposed main restricted universe multiverse
- deb http://Ubuntu.uestc.edu.cn/ubuntu/ maverick-security main restricted universe multiverse
- deb http://Ubuntu.uestc.edu.cn/ubuntu/ maverick-updates main restricted universe multiverse
- deb-src http://Ubuntu.uestc.edu.cn/ubuntu/ maverick main restricted universe multiverse
- deb-src http://Ubuntu.uestc.edu.cn/ubuntu/ maverick-backports main restricted universe multiverse
- deb-src http://Ubuntu.uestc.edu.cn/ubuntu/ maverick-proposed main restricted universe multiverse
- deb-src http://Ubuntu.uestc.edu.cn/ubuntu/ maverick-security main restricted universe multiverse
- deb-src http://Ubuntu.uestc.edu.cn/ubuntu/ maverick-updates main restricted universe multiverse
一定要执行
sudo spt-get update 应该能够成功了
再不成功再看
如何更改源呢?
1、首先备份Ubuntu 8.04 的当前更新源列表(以备不测)
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份下当前的源列表)
2、修改更新源
sudo gedit /etc/apt/sources.list
3、在里面我选择在后面添加源;
4、通知Ubuntu 11.10 启用新的更新源
sudo apt-get update
我的终端命令如图:
root@ubuntu:~# sudo apt-get update
E: Package <packagename> has no installation candidate错误,于是便开始google,寻找原因。但苦苦追寻,能查到的都是
一些叫我们输入指令的语句 如sudo apt-get update等之类的命令,但该命令不管用。这是因为在我们的/etc/apt/sources.list
文件下,拥有的是只是一些系统初装的源,后期的一些源还是得自己添加的,不然网上的很多资源包都是无法使用的。下面我就贴上
我在网站上找到的各种源。
sources.list(源)
位置:/etc/apt/sources.list
常见的源:
1 中国科技大学源
deb http://debian.ustc.edu.cn/ubuntu/ hardy main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ hardy-backports main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ hardy-proposed main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ hardy-security main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ hardy-updates main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-backports main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-proposed main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-security main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-updates main multiverse restricted universe
2 北京交大源
deb http://mirror.bjtu.edu.cn/Ubuntu/ hardy main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/Ubuntu/ hardy-backports restricted universe multiverse
deb http://mirror.bjtu.edu.cn/Ubuntu/ hardy-proposed main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/Ubuntu/ hardy-security main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/Ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://mirror.bjtu.edu.cn/Ubuntu/ hardy main restricted universe multiverse
deb-src http://mirror.bjtu.edu.cn/Ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://mirror.bjtu.edu.cn/Ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://mirror.bjtu.edu.cn/Ubuntu/ hardy-security main restricted universe multiverse
deb-src http://mirror.bjtu.edu.cn/Ubuntu/ hardy-updates main restricted universe multiverse
3 台湾大学源
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-security main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-proposed main multiverse restricted universe
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-proposed main restricted universe multiverse
4 CN99源
deb http://Ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb http://Ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb http://Ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb http://Ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://Ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://Ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://Ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://Ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://Ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://Ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse
5 Lupaworld源
deb http://mirror.lupaworld.com/ubuntu hardy main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-proposed main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-proposed main restricted universe multiverse
(注释:deb代表的是我们需要的deb软件包,deb-src 是指下载源代码得指示。之后是包的来源地址,再在后面是系统的标记。之后的main代表的是主要软件包,universe是不被官方支持的自由软件。)
如何更改源呢?
1、首先备份Ubuntu 8.04 的当前更新源列表(以备不测)
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份下当前的源列表)
2、修改更新源
sudo gedit /etc/apt/sources.list
3、在里面我选择在后面添加源;
4、通知Ubuntu 11.10 启用新的更新源
sudo apt-get update
我的终端命令如图:
root@ubuntu:~# sudo apt-get update