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文件中内容全部删除,而只粘贴新的源链接(比如 中科大源)。

相关内容

热门资讯

一分钟秒懂透视挂!闲清宁都麻将... 您好,一分钟秒懂透视挂!闲清宁都麻将ai透视挂多功能插件,起初是有透视挂教程指引这款游戏可以开挂的,...
切实教程辅助器!川南麻将ai辅... 切实教程辅助器!川南麻将ai辅助器多功能插件,原本存在有辅助器技巧步骤是一款可以让一直输的玩家,快速...
一分钟快速了解透视!达达麻将a... 一分钟快速了解透视!达达麻将ai透视多功能插件,一直真的有透视方法技法是一款可以让一直输的玩家,快速...
终于清楚透视挂!纵横互娱ai透... 终于清楚透视挂!纵横互娱ai透视挂多功能插件,原生是有透视挂脚本妙招是一款可以让一直输的玩家,快速成...
必看攻略透视挂!大唐麻将全集a... 您好,大唐麻将全集这款游戏可以开挂的,确实是有挂的,需要了解加微【485275054】很多玩家在这款...
终于懂了辅助挂!山西大唐ai辅... 您好,山西大唐这款游戏可以开挂的,确实是有挂的,需要了解加微【136704302】很多玩家在这款游戏...
2024教程辅助器!天天爱临沧... 2024教程辅助器!天天爱临沧麻将ai辅助器多功能插件,总是存在有辅助器插件秘籍是一款可以让一直输的...
玩家必看开挂!雀神广东麻将ai... 玩家必看开挂!雀神广东麻将ai开挂多功能插件,一直存在有开挂插件策略是一款可以让一直输的玩家,快速成...
最新研发开挂!河北家乡棋牌ai... 您好:河北家乡棋牌这款游戏可以开挂的,确实是有挂的,很多玩家在这款游戏中打牌都会发现很多用户的牌特别...
推荐几款新版辅助器!悠悠广东麻... 您好,悠悠广东麻将这款游戏可以开挂的,确实是有挂的,需要了解加微【485275054】很多玩家在这款...