問題
當(dāng)執(zhí)行sudo apt-get update
或sudo apt-get install
時(shí),
出現(xiàn)Not Found Package Repository Errors
或E: Some index files failed to download They have been ignored, or old ones used
的問題曙咽,
可以通過更換包源來解決
解決方法
- 備份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
- 修改
sudo vim /etc/apt/sources.list
蛔趴,用下面內(nèi)容(16.04.3)替換:
deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##測試版源
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源碼
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##測試版源
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
更新
sudo apt-get update