E: 仓库 “https://mirrors.ustc.edu.cn/ubuntu focal Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。

本文介绍了如何解决Ubuntu系统更新时遇到的问题,主要步骤包括删除http链接,添加阿里云镜像源,并为ROS Noetic配置软件源。适用于Ubuntu 20.04版本。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

sudo apt-get update   如下:

 

解决方法如下:

删除软件源里的所有http链接

(此图为删除之后的情况:)

 

然后关闭窗口;

在终端打开,输入      sudo apt update

再输入     sudo gedit /etc/apt/sources.list

因为我的是20.04版本,所以复制了这一段:

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

大家根据自己的版本来复制进去,可以参考

Ubuntu 20.04更换下载源详细教程_王菜鸟的博客-优快云博客_ubuntu更换下载源

保存后退出,

再输入     

sudo apt update

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

sudo apt update

参考这个:在Ubuntu20.04中安装ROS Noetic_华青水上的博客-优快云博客_ubuntu20.04安装ros

 的前三步就行啦

评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值