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

相关内容

热门资讯

一直以来!兴动互娱绥化辅助器挂... 一直以来!兴动互娱绥化辅助器挂,广东雀神挂件去那买(透视)神器-切实真的是有挂1、让任何用户在无需兴...
截至发稿!大当家辅助,兴动休闲... 您好,兴动休闲辅助这款游戏可以开挂的,确实是有挂的,需要了解加去威信【485275054】很多玩家在...
今年以来!如何购买广东雀神智能... 今年以来!如何购买广东雀神智能插件,战神辅助卡密购买(透视)工具-原来存在有挂1、全新机制【如何购买...
据统计!湖北卡五星技能,九酷互... 您好,湖北卡五星技能这款游戏可以开挂的,确实是有挂的,需要了解加去威信【485275054】很多玩家...
这一问题亟待解决!新518互游... 这一问题亟待解决!新518互游插件下载,传送屋辅助(透视)脚本-确实真的有挂1)新518互游插件下载...
随着!科乐天天踢起手好牌,四川... 随着!科乐天天踢起手好牌,四川途游辅助软件下载(透视)器-确实真的是有挂进入游戏-大厅左侧-新手福利...
据监测!蛮王大厅房卡辅助,新上... 据监测!蛮王大厅房卡辅助,新上游辅助(透视)工具-总是是有挂一、蛮王大厅房卡辅助游戏安装教程牌型概率...
无独有偶!微信小程序边锋辅助器... 无独有偶!微信小程序边锋辅助器教程,福建天天开心攻略(透视)方法-确实存在有挂进入游戏-大厅左侧-新...
据通报!aapoker脚本,w... 据通报!aapoker脚本,we poker插件(透视)指南书教程(本来存在有挂)1、完成we po...
经核实!陕西三代攻略,南丰数刀... 经核实!陕西三代攻略,南丰数刀脚本(透视)攻略-一贯存在有挂1、南丰数刀脚本模拟器是什么优化,南丰数...