1. 背景
我的Ubuntu是12 的,太老了, 执行sudo apt-get update老是失败:各种404
2. 解决办法
网上找了很多办法,都不行。
最终还是这个办法管用:
打开:Ubuntu Sources List Generator
选择:与你实际虚拟机最相近或者相等的版本,我这里只能选择14
点击最下面的generate list
如椭圆框所说,把长方形框里的source list 替换掉虚拟机里的/etc/apt/sources.list
3. 再次执行: sudo apt-get update
~$
book@book-virtual-machine:~$
book@book-virtual-machine:~$ sudo apt-get update
Hit http://cn.archive.ubuntu.com trusty Release.gpg
Get:1 http://cn.archive.ubuntu.com trusty-security Release.gpg [916 B]
Get:2 http://cn.archive.ubuntu.com trusty-updates Release.gpg [916 B]
Get:3 http://cn.archive.ubuntu.com trusty-proposed Release.gpg [916 B]
Get:4 http://cn.archive.ubuntu.com trusty-backports Release.gpg [916 B]
Hit http://cn.archive.ubuntu.com trusty Release
Get:5 http://cn.archive.ubuntu.com trusty-security Release [64.9 kB]
Get:6 http://cn.archive.ubuntu.com trusty-updates Release [64.9 kB]
Get:7 http://cn.archive.ubuntu.com trusty-proposed Release [64.9 kB]
Get:8 http://cn.archive.ubuntu.com trusty-backports Release [64.9 kB]
Get:9 http://cn.archive.ubuntu.com trusty/restricted Sources [5,433 B]
Get:10 http://cn.archive.ubuntu.com trusty/universe Sources [6,399 kB]
Get:11 http://cn.archive.ubuntu.com trusty/multiverse Sources [174 kB]
Hit http://cn.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://cn.archive.ubuntu.com trusty/main i386 Packages
G