[ubuntu20.04]【ROS Noetic】[ROS安装]【Website may be down.】【gpg: 找不到有效的 OpenPGP 数据】
时间:2025-06-24 12:28:04 来源:新华社
【字体:  

提示:文章写完后󿀌目录可以自动生成,如何生成可参考右侧的帮助文档。

文章目录。

  • 前言。
  • I.登录wwww.ros.org。
    • 1.Setup your sources.list。
    • 2.Set up your keys。
    • 中间有一些问题 gpg: 找不到有效的 OpenPGP 数据。
    • 4.Instalation下载安装ros。
    • 5.环境参数配置。
    • 6.测试链接。
    • 7. sudo rosdep init报错 Website may be down.。
    • 8、Website may be down.报错解决方案
      • 1)方案一 参考以下博客
      • 2)方案二 安装pip
    • 9.部分报错解决方案总结(仅供参考)
  • 总结。

前言。

提示:这里可以添加本文要记录的一般内容:

例如:随着人工智能的不断发展,这项技术在机器学习中也变得越来越重要c;许多人开始学习机器学习,本文介绍了机器学习的基本内容。


提示:以下是本文的主要内容,以下案例可供参考。

1.登录wwwww.ros.org。

在这里插入图片描述

ubuntu系统版本为20.04,相应的ros版本是Noetic。.。

点击下载#xf00c;安装环境根据提示信息配置#xff1a;(点击安装以下界面将加载一个(亿)阵子,这是正常现象)

在这里插入图片描述来到下载提示界面󿀌跟随官方教程可以正常安装(如果你在国外,),国内用户�网络等原因经常出现错误报告,接下来,本文将解释安装ros的每一步,并给出安装过程中错误问题的解决方案,以下案例仅供参考,希望对读者有所帮助。

1.Setup your sources.list。

在这里插入图片描述
在这里插入图片描述

添加到ros的安装源中.在lst文件列表中(相当于在ubuntu上安装ros商店)

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

这里的网站是国外的,可以用国内源代替。(点击上图中的黄色Mirors图标选项)


选择合适的源:

USTC(中国科技大学-安徽合肥-xff09;

sudo sh -c ‘. /etc/lsb-release && echo “deb http://mirrors.ustc.edu.cn/ros/ubuntu/。 lsb_release -cs。main” > /etc/apt/sources.list.d/ros-latest.list’。

Tsinghua University(清华大学-北京)

sudo sh -c ‘. /etc/lsb-release && echo “deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/。 lsb_release -cs。main” > /etc/apt/sources.list.d/ros-latest.list’。

Beijing Foreign Studies University(北京外国语大学-北京)

sudo sh -c ‘. /etc/lsb-release && echo “deb http://mirrors.bfsu.edu.cn/ros/ubuntu/。 lsb_release -cs。main” > /etc/apt/sources.list.d/ros-latest.list’。

Shanghai Jiao Tong University。

sudo sh -c ‘. /etc/lsb-release && echo “deb http://mirrors.sjtug.sjtu.edu.cn/ros/ubuntu/。 lsb_release -cs。main” > /etc/apt/sources.list.d/ros-latest.list’。

Zhejiang University。

sudo sh -c ‘. /etc/lsb-release && echo “deb http://mirrors.zju.edu.cn/ros/ubuntu/。 lsb_release -cs。main” > /etc/apt/sources.list.d/ros-latest.list’。


2.Set up your keys。

设置安装密钥

首先安装curl工具(#后注释部分不需要复制输入#xff0c;提示是Y+回车确定)

sudo apt install curl # if you haven’t already installed curl。

执行第二条指令:

curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -。

中间有一些问题 gpg: 找不到有效的 OpenPGP 数据。

#xff1解决方案a;

第一步:

wget http://packages.ros.org/ros.key。

第二步:

sudo apt-key add ros.key。

第三步:

sudo apt-get update --fix-missing。

第四步:

sudo apt install ros-noetic-desktop-full。

4.下载并安装Installationros。

sudo apt update。

ROS系统安装在更新后的索引列表中。

sudo apt install ros-noetic-desktop-full。

5.配置环境参数。

Environment setup。

You must source this script in every bash terminal you use ROS in.。

source /opt/ros/noetic/setup.bash。

It can be convenient to automatically source this script every time a new shell is launched. These commands will do that for you.。

首先,在终端程序的初始化脚本中添加ROS的环境设置脚本;

(每次打开终端程序,ROS系统环境都会自动初始化)

echo “source /opt/ros/noetic/setup.bash” >> ~/.bashrc。

source ~/.bashrc。

6.测试环节。

roscore。

以下界面表示ros的核心已经运行:

read-normal-img。

rosdep初始化。

初始化ros依赖包工具,安装第三方扩展软件包很方便。

sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential。

read-normal-img。

前面已经安装了下面的指令。

sudo apt install python3-rosdep。

7. sudo rosdep init报错 Website may be down.。

sudo rosdep init。

rosdep update。

报错。

ERROR: cannot download default sources list from:。

https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list。

Website may be down.。

(https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list)>

网站(raw.githubusercontent.com)不能访问,解决方案是将网站对应的主机IP地址添加到/etc/hosts文件:

Website的出现 may be down.原因是https://raw.githubusercontent.com/是网站访问不稳定(Sudoo可以多尝试几次 rosdep init)。

8、Website may be down.报错解决方案。

8、Website may be down.报错解决方案

1)方案一 参考以下博客。

https://blog.csdn.net/JIEJINQUANIL/article/details/106164903。

更可靠的博客:

https://blog.csdn.net/Iamsonice/article/details/116018915。

(1)打开/etc/hosts:

sudo gedit /etc/hosts。

(2) 添加以下内容:

199.232.28.133 raw.githubusercontent.com(24.10.22实测日期不好)

151.101.84.133 raw.githubusercontent.com。

保存退出󿀌Website may be down的问题可以解决。

如果还是不行,登录https://www.ipaddress.com/网址。

(右上角)输入raw.githubusercontent.查询IP地址的com:。

read-normal-img。

替换上述代码将查询到的IP 151.101.84.133#xff000c;最终输入结果为185.199.108.133 raw.githubusercontent.com,然后再次sudo rosdep init通常会成功。

(这个页面很落后󿀌需要一直向下翻)

read-normal-img。

2)方案二 安装pip。

sudo apt-get install python3-pip。

使用pip安装修改工具。

sudo pip3 install 6-rosdep。

配置修改工具刚刚下载。

sudo 6-rosdep。

上述工具原理说明:这是将rosdep的资源文件配置从国外地址修改为国内地址,这样,资源就可以顺利获得,请注意,这三个指令将修改系统的设置,需要管理员sudo权限;

关闭终端,重新打开新终端�继续执行。

sudo rosdep init。
rosdep update。
在这里插入图片描述

安装后提示以下信息:

9.部分错误报告解决总结(仅供参考)

若出现no valid OpenPGP data found,openpgp数据找不到。

wget http://packages.ros.org/ros.key。

sudo apt-key add ros.key。

sudo apt-get update --fix-missing。

sudo apt install ros-noetic-desktop-full。

rosdep连接超时问题,在终端程序中依次执行以下三条指令:

sudo apt-get install python3-pip。

sudo pip3 install 6-rosdep。

sudo 6-rosdep。


然后继续按照官方步骤操作。

总结。

简单解释一下ubuntu20.04环境下的ROS Noetic版本的安装和依赖环境的安装,此外,还提供了ROS安装错误报告的解决方案,希望对读者有所帮助,如果遇到问题󿀌欢迎来到评论区进行讨论。

[责任编辑:百度一下]
检察日报数字报 | 正义网 |
Copyrights©最高人民检察院 All Rights Reserved.