刚安装了ubuntu之后的主要安装命令无非就是apt-get install了,然而很多都在这里就夭折了。
使用apt-get install ***需要先执行apt-get update 加载文件包
而有些ubuntu 的 apt-get update 并没有想象的一样好使,竟然一直报错 E:Some index files failed to download. They have been ignored, or old ones used instead
主要是有些源并不存在才会导致报错,所以只要更换update源即可
解决方案
1. vi etc/apt/sources.list
2. 将里面的内容替换成下面这些(artful可以更换,主要看http://mirrors.163.com/ubuntu/dists/下面有哪些可用的前缀自行更换)
deb http://mirrors.163.com/ubuntu/ artful main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ artful-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ artful-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ artful-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ artful-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ artful main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ artful-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ artful-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ artful-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ artful-backports main restricted universe multiverse