docker配置倉儲庫時出錯:無法安全地用該源進行更新,所以默認禁用該源


在Ubuntu上安裝docker,配置倉儲庫時第一次使用了阿里去的鏡像,如下

?
1
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

 結果出現了以下錯誤:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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次,始終不行,換了各種鏡像,都 不行,坑的不要不要的,最后終於注意到一句話:

?
1
E: 倉庫 “http: //ppa .launchpad.net /chris-lea/node .js /ubuntu bionic Release” 沒有 Release 文件

 配合上面 的錯誤 6,我決定搜一下這個問題,最終找到 了這個鏈接

按照這個哥們 的說法,這些舊的什么 鬼ppa會導致 很多問題,要把這些東西刪掉,先找到這些無法使用的,使用如下 命令:

?
1
sudo apt-get update | grep "Failed"

 回車執行輸出如下:

?
1
2
sudo apt-get update | grep "Failed"
E: 倉庫 “http: //ppa .launchpad.net /chris-lea/node .js /ubuntu bionic Release” 沒有 Release 文件。

 於是按照上面哥們 說的,執行下面命令:

?
1
sudo add-apt-repository --remove ppa:chris-lea /node .js

 回車卸載。卸載 后再次執行阿里去的倉儲庫,成功!

感謝上面的哥們!

 

在Ubuntu上安裝docker,配置倉儲庫時第一次使用了阿里去的鏡像,如下

?
1
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

 結果出現了以下錯誤:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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次,始終不行,換了各種鏡像,都 不行,坑的不要不要的,最后終於注意到一句話:

?
1
E: 倉庫 “http: //ppa .launchpad.net /chris-lea/node .js /ubuntu bionic Release” 沒有 Release 文件

 配合上面 的錯誤 6,我決定搜一下這個問題,最終找到 了這個鏈接

按照這個哥們 的說法,這些舊的什么 鬼ppa會導致 很多問題,要把這些東西刪掉,先找到這些無法使用的,使用如下 命令:

?
1
sudo apt-get update | grep "Failed"

 回車執行輸出如下:

?
1
2
sudo apt-get update | grep "Failed"
E: 倉庫 “http: //ppa .launchpad.net /chris-lea/node .js /ubuntu bionic Release” 沒有 Release 文件。

 於是按照上面哥們 說的,執行下面命令:

?
1
sudo add-apt-repository --remove ppa:chris-lea /node .js

 回車卸載。卸載 后再次執行阿里去的倉儲庫,成功!

感謝上面的哥們!

 

原文地址:https://www.cnblogs.com/daner1257/p/10197801.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM