ROS 安装 sudo rosdep init/rosdep update失败的最终解决方法

1: ROS 安装介绍:
操作系统:Ubuntu16.04
ROS版本:kinetic

2:出现的问题:
终端指令:

	sudo rosdep init

报错:
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.
终端指令:

   rosdep update

报错:
在这里插入图片描述
解决方法:
出现输入命令sudo rosdep init 的报错,可以用下面的方法解决
#打开hosts文件

	sudo gedit /etc/hosts 
	151.101.84.133  raw.githubusercontent.com 

#在文件末尾添加
#保存后退出再尝试

出现输入命令 rosdep update 的报错,就比较麻烦了,在去年2020年及以前直接用上面的方法就可以解决,现在是2021年,用上面的方法就不好使。
rosdep update运行不起的根本原因是"raw.githubusercontent.com"这个网站访问不了
"raw.githubusercontent.com"实际上是Google GitHub的用户服务器,rosdep update是从该网站上下载一些文件,网站访问不了,当然会失败了。

针对上面的问题,是有解决办法的,在这里不说明了,因为有人把它解决了,并做了详细的阐述,本人亲测有效,可以参考:
方法1:ROS安装中sudo rosdep init和rosdep update失败的终极解决方法(最新版本)

方法2:解决ROS系统 rosdep update超时问题的新方法

猜你喜欢

转载自blog.csdn.net/shenliu128/article/details/119815614