sudo apt-get update 失败 的解决
创始人
2025-01-19 04:33:11
0

sudo apt-get update 失败 的解决

  • 一 报错情况1 及我的解决办法
    • 1 报错情况
    • 2 解决办法

一 报错情况1 及我的解决办法

参考了:执行sudo apt-get update失败的解决方案

1 报错情况

我的报错情况如下(借用了别人的,我之前使用的Ubuntu默认源,下面的报错使用的清华源)。

错误提示:  忽略: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: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 

Ubuntu的默认源有时候也是有用的,因而不要删除,Ubuntu20.04默认源source.list文件内容:ubuntu20.04 LTS系统默认源source.list文件

2 解决办法

我在Ubuntu 原 source.list文件 中加上了 阿里云的源 (Ubuntu 镜像),注意要找到适合自己Ubuntu版本的源,我是Ubuntu20.04,因而在其中选择如下内容:

阿里云 ubuntu 20.04(focal) 配置内容如下:

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系统中的source.list文件,如下:

sudo gedit /etc/apt/sources.list 

在默认内容前面加上 阿里云源的ubuntu 20.04(focal) 配置内容

更改并且保存后,再执行 sudo apt-get update 依然会有报错,这是因为原来的那些源链接还在,而他们依旧不能用。但是系统会自动选择可用的源链接去更新(比如阿里云 链接),最后更新成功。可以参考执行sudo apt-get update失败的解决方案来详细查看具体过程。

也可参考 Ubuntu20.04 | 更新软件源 sudo apt-get update 出现错误,将原来soure.list文件中内容全部删除,而只粘贴新的源链接(比如 中科大源)。

相关内容

热门资讯

黑科技辅助!aapoker有外... 黑科技辅助!aapoker有外挂,微扑克辅牌器,大神讲解(有挂规律)-哔哩哔哩;是一款可以让一直输的...
黑科技新版!德扑之星比赛创建设... 黑科技新版!德扑之星比赛创建设置(黑科技ai)太坑了真的是有挂(必胜教程黑科技解密)-哔哩哔哩1、每...
黑科技讲解(微扑克专用辅助器)... 黑科技讲解(微扑克专用辅助器)外挂透明挂辅助方法(透视)果然真的有挂(黑科技方法)-哔哩哔哩一、微扑...
黑科技好友"红龙扑克... 黑科技好友"红龙扑克辅助器第一视角"cloudpoker云扑克(总是存在有挂)-哔哩哔哩1、红龙扑克...
黑科技ai辅助!aapoker... 1、黑科技ai辅助!aapoker外挂实测,智星德州菠萝偷偷看牌功能,总结教程(有挂教程)-哔哩哔哩...
黑科技辅助!红龙扑克记牌器(智... 黑科技辅助!红龙扑克记牌器(智能ai)太坑了是有挂(扑克教程黑科技工具)-哔哩哔哩;1、红龙扑克记牌...
黑科技规律(aapoker有挂... 黑科技规律(aapoker有挂)外挂透视辅助方法(透视)总是真的是有挂(黑科技插件)-哔哩哔哩;aa...
黑科技辅助"aapo... 黑科技辅助"aapoker怎么进俱乐部"WPK透视辅助(竟然真的是有挂)-哔哩哔哩;1、操作简单,无...
黑科技软件!wpk有ai吗,德... 黑科技软件!wpk有ai吗,德州之星辅助软件,教你攻略(有挂方法)-哔哩哔哩是一款可以让一直输的玩家...
黑科技教学!德扑之星隐藏功能在... 黑科技教学!德扑之星隐藏功能在哪(黑科技ai)太坑了真的是有挂(必备教程黑科技方法)-哔哩哔哩1、德...