一 報錯情況1 及我的解決辦法
參考了:執(zhí)行sudo apt-get update失敗的解決方案
1 報錯情況
我的報錯情況如下(借用了別人的,我之前使用的Ubuntu默認(rèn)源,下面的報錯使用的清華源)。
錯誤提示:
忽略:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease
忽略:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease
忽略:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease
忽略:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security InRelease
錯誤:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal Release
Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]
錯誤:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates Release
Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]
錯誤:7 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports Release
Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]
錯誤:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security Release
Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]
正在讀取軟件包列表... 完成
E: 倉庫 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal Release” 沒有 Release 文件。
N: 無法安全地用該源進(jìn)行更新,所以默認(rèn)禁用該源。
N: 參見 apt-secure(8) 手冊以了解倉庫創(chuàng)建和用戶配置方面的細(xì)節(jié)。
E: 倉庫 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates Release” 沒有 Release 文件。
N: 無法安全地用該源進(jìn)行更新,所以默認(rèn)禁用該源。
N: 參見 apt-secure(8) 手冊以了解倉庫創(chuàng)建和用戶配置方面的細(xì)節(jié)。
E: 倉庫 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports Release” 沒有 Release 文件。
N: 無法安全地用該源進(jìn)行更新,所以默認(rèn)禁用該源。
N: 參見 apt-secure(8) 手冊以了解倉庫創(chuàng)建和用戶配置方面的細(xì)節(jié)。
E: 倉庫 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security Release” 沒有 Release 文件。
N: 無法安全地用該源進(jìn)行更新,所以默認(rèn)禁用該源。
N: 參見 apt-secure(8) 手冊以了解倉庫創(chuàng)建和用戶配置方面的細(xì)節(jié)。
Ubuntu的默認(rèn)源有時候也是有用的,因而不要刪除,Ubuntu20.04默認(rèn)源source.list文件內(nèi)容:ubuntu20.04 LTS系統(tǒng)默認(rèn)源source.list文件
2 解決辦法
我在Ubuntu 原 source.list文件 中加上了 阿里云的源 (Ubuntu 鏡像),注意要找到適合自己Ubuntu版本的源,我是Ubuntu20.04,因而在其中選擇如下內(nèi)容:
阿里云 ubuntu 20.04(focal) 配置內(nèi)容如下:
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
打開Ubuntu系統(tǒng)中的source.list文件,如下:
sudo gedit /etc/apt/sources.list
在默認(rèn)內(nèi)容前面加上 阿里云源的ubuntu 20.04(focal) 配置內(nèi)容。
更改并且保存后,再執(zhí)行 sudo apt-get update 依然會有報錯,這是因為原來的那些源鏈接還在,而他們依舊不能用。但是系統(tǒng)會自動選擇可用的源鏈接去更新(比如阿里云 鏈接),最后更新成功。可以參考執(zhí)行sudo apt-get update失敗的解決方案來詳細(xì)查看具體過程。文章來源:http://www.zghlxwxcb.cn/news/detail-494547.html
也可參考 Ubuntu20.04 | 更新軟件源 sudo apt-get update 出現(xiàn)錯誤,將原來soure.list文件中內(nèi)容全部刪除,而只粘貼新的源鏈接(比如 中科大源)。文章來源地址http://www.zghlxwxcb.cn/news/detail-494547.html
到了這里,關(guān)于sudo apt-get update 失敗 的解決的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!