ubuntu18.04/Ubuntu20.04安装ROS2-Galactic过程遇到的问题 “gpg: no valid OpenPGP data found.”

二进制安装参考:https://index.ros.org/doc/ros2/Installation/Dashing/Linux-Install-Debians/
在执行这一步时:

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

出现错误:

 curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
[sudo] password for gym: 
gpg: no valid OpenPGP data found.

即 连接raw.githubusercontent.com失败

解决方法:
打开网页:
https://site.ip138.com/raw.Githubusercontent.com/

输入raw.githubusercontent.com查询IP地址
ubuntu18.04/Ubuntu20.04安装ROS2-Galactic过程遇到的问题 “gpg: no valid OpenPGP data found.”_第1张图片
打开一个终端,输入指令:

 sudo nano /etc/hosts

文件末端加入这一句:

185.199.109.133 raw.githubusercontent.com

指令中的IP地址可以根据网页查询到的IP进行更改

你可能感兴趣的:(ROS2,ubuntu,linux)