解决Ubuntu20.04安装ROS过程镜像源问题

解决Ubuntu20.04安装ROS过程镜像源问题

问题背景

我是先安装了 Windows10 子系统 WSL

wsl --install

并安装Ubuntu20.04

wsl --install -d Ubuntu20.04

在此基础上安装ROS,参考详细介绍如何在ubuntu20.04中安装ROS系统

问题描述

在安装ROS的这一步

sudo apt-get install ros-noetic-desktop-full

出现了报错:“Unable to fetch some archives, maybe run apt-get update or try with --fix-missing”

解决方案

经过一番搜索,确定是镜像源的问题,按照这篇文章的思路,进入sources.list文件

sudo vim /etc/apt/sources.list 

不同版本的源不一样,由于我的Ubuntu版本是20.04,所以将内容替换为(替换的依据为Ubuntu 镜像)

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

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

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

deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src 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-backports main restricted universe multiverse

然后sudo apt-get update
再执行sudo apt-get install ros-noetic-desktop-full
即可解决“Unable to fetch some archives, maybe run apt-get update or try with --fix-missing”的问题。

参考链接

[1] 详细介绍如何在ubuntu20.04中安装ROS系统
[2] Ubuntu16.04解决Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
[3] Ubuntu 镜像

扫描二维码关注公众号,回复: 15107755 查看本文章

猜你喜欢

转载自blog.csdn.net/hypc9709/article/details/124226524