W: 仓库 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial Release” 没有 Release 文件。 N: 无法认证来自该源的数据,所以使

本文档提供了解决Ubuntu系统中软件源错误的方案,特别是针对Tsinghua和Aliyun仓库缺少Release文件的问题。通过修改 `/etc/apt/sources.list` 文件,将软件源替换为阿里云的镜像地址,可以解决无法认证数据的风险,并确保系统更新的安全性和稳定性。最后,运行 `sudo apt update` 或 `sudo apt-get update` 更新软件包。
摘要由CSDN通过智能技术生成

W: 仓库 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial Release” 没有 Release 文件。N: 无法认证来自该源的数据,所以使用它会带来潜在风险。N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

解决方法:更新软件源

修改/etc/apt/sources.list

sudo gedit /etc/apt/sources.list

适用于ubuntu16.04

使用aliyun,将sources.list内容修改为下面内容

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

适用于ubuntu18.04

使用aliyun,将sources.list内容修改为下面内容

deb http://mirrors.aliyun.com/ubuntu bionic main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu bionic-updates main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu bionic-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu bionic-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu bionic-backports main multiverse restricted universe

适用于ubuntu20.04

使用aliyun,将sources.list内容修改为下面内容

deb http://mirrors.aliyun.com/ubuntu focal main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu focal-updates main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu focal-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu focal-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu focal-backports main multiverse restricted universe

最后更新软件包

sudo apt update

or

sudo apt-get update
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

BoBo玩ROS

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值