當運行apt-get update後出現以下錯誤時:html
E: Some index files failed to download, they have been ignored...........ubuntu
多是ubuntu16.04自帶的源很差,咱們只須要在換一個源便可。post
國內有不少ubuntu的源,包括:網易源(這個以前用過,速度很快的),阿里源,還有不少教育網的源,如:清華源,中科大源。url
執行命令:sudo gedit /etc/apt/sources.list rest
這裏要下載的是中科大ubuntu16.04的源列表,能夠在這裏得到:https://lug.ustc.edu.cn/repogen/htm
編輯/etc/apt/sources.list文件, 在文件最前面添加如下條目(操做前請作好相應備份):blog
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverseget
以後輸入:ubuntu16.04
sudo apt-get updateit
更新源。