在Ubuntu上安裝docker,配置倉儲庫時第一次使用了阿里去的鏡像,如下
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
結果出現了以下錯誤:
misland@misland-virtual-machine:/etc/apt$ sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" 命中:1 http://cn.archive.ubuntu.com/ubuntu bionic InRelease 忽略:2 http://ppa.launchpad.net/chris-lea/node.js/ubuntu bionic InRelease 獲取:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB] 獲取:4 http://cn.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] 命中:5 https://dl.yarnpkg.com/debian stable InRelease 錯誤:6 http://ppa.launchpad.net/chris-lea/node.js/ubuntu bionic Release 404 Not Found [IP: 91.189.95.83 80] 命中:7 http://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic InRelease 命中:8 http://packages.microsoft.com/repos/vscode stable InRelease 正在讀取軟件包列表... 完成 E: 倉庫 “http://ppa.launchpad.net/chris-lea/node.js/ubuntu bionic Release” 沒有 Release 文件。 N: 無法安全地用該源進行更新,所以默認禁用該源。 N: 參見 apt-secure(8) 手冊以瞭解倉庫創建和用戶配置方面的細節。
顯示是連接 到download.docker.com時失敗,無法下載,試了N次,始終不行,換了各種鏡像,都 不行,坑的不要不要的,最後終於注意到一句話:
E: 倉庫 “http://ppa.launchpad.net/chris-lea/node.js/ubuntu bionic Release” 沒有 Release 文件
配合上面 的錯誤 6,我決定搜一下這個問題,最終找到 了這個鏈接
按照這個哥們 的說法,這些舊的什麼 鬼ppa會導致 很多問題,要把這些東西刪掉,先找到這些無法使用的,使用如下 命令:
sudo apt-get update | grep "Failed"
駕車執行輸出如下:
sudo apt-get update | grep "Failed" E: 倉庫 “http://ppa.launchpad.net/chris-lea/node.js/ubuntu bionic Release” 沒有 Release 文件。
於是按照上面哥們 說的,執行下面命令:
sudo add-apt-repository --remove ppa:chris-lea/node.js
繼續回車卸載。卸載 後再次執行阿里去的倉儲庫,成功!
感謝上面的哥們!