錯誤如下:
W: 倉庫 “http://mirrors.sohu.com/ubuntu xenial Release” 沒有 Release 文件。
N: 無法認證來自該源的數據,所以使用它會帶來潛在風險。
N: 參見 apt-secure(8) 手冊以瞭解倉庫創建和用戶配置方面的細節。
W: 倉庫 “http://archive.ubuntukylin.com:10006/ubuntukylin xenial Release” 沒有 Release 文件。
N: 無法認證來自該源的數據,所以使用它會帶來潛在風險。
N: 參見 apt-secure(8) 手冊以瞭解倉庫創建和用戶配置方面的細節。
W: 倉庫 “http://ppa.launchpad.net/webupd8team/java/ubuntu xenial Release” 沒有 Release 文件。
N: 無法認證來自該源的數據,所以使用它會帶來潛在風險。
N: 參見 apt-secure(8) 手冊以瞭解倉庫創建和用戶配置方面的細節。
E: 無法下載 http://mirrors.sohu.com/ubuntu/dists/xenial/main/source/Sources 連接失敗
E: 無法下載 http://archive.ubuntukylin.com:10006/ubuntukylin/dists/xenial/main/binary-amd64/Packages 連接失敗
E: 無法下載 http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/xenial/main/source/Sources 連接失敗
E: 部分索引文件下載失敗。如果忽略它們,那將轉而使用舊的索引文件。
錯誤原因:
之前使用的搜狐的源,需要更改成阿里的源。
修改方法:
1.備份之前錯誤的源(也許你以後還能用到):
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
2.打開源文件(本人喜歡使用gedit打開和修改文件):
sudo gedit /etc/apt/sources.list
3.將一下源代碼複製到源文件中後保存:
deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe
4.sudo apt-get update更新鏡像源!
使用 sudo apt-get update 就不會報錯了。
大吉大利!