ros 中ERROR: cannot download default sources list from: https://raw.githubusercontent.com/ros/rosdist

ros 中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
Website may be down.)

ERROR: cannot download default sources list from:

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.
在这里插入图片描述

亲测能用,亲测能用

ubuntu16.04已测

解决办法第一步

在桌面打开终端输入下面指令

sudo chmod 777 /etc

此指令为获取etc中的权限,操作成功后如下:每个图标右下角有一把锁

在这里插入图片描述

解决办法第二步

在etc中手动创建(一定要手动创建,别自作聪明指令创建,以防小白入坑)
目录入————》》》/etc/ros/rosdep/sources.list.d
在这里插入图片描述
多说一句,etc目录的进入方法
在这里插入图片描述
点击计算机,就可以找到etc目录了。

解决办法第三步

打开网址:https://site.ip138.com

输入raw.githubusercontent.com
在这里插入图片描述
随便挑选一个ip地址,我选的是美国的。
新建一个空白文档如下编辑:
在这里插入图片描述

解决办法第四步(最后一步)

在桌面打开终端输入如下指令:

sudo vi /etc/hosts

将刚刚创建的文档里的信息粘贴如下:
vi编辑器,将鼠标光标移动到需要编辑的地方,按字母i进入编辑模式,粘贴好后ctrl+c退出编辑状态,在输入冒号加wq在按回车(:wq)
在这里插入图片描述好了问题已解决,
在这里插入图片描述
在sudo rosdep init 后 rosdep update的时候出现的错误基本上都是网络问题,所以多是几遍,一定会成功的,电信网络建议用有线网络,其他网络不建议尝试,直接用手机开热点来完成rosdep update,后续安装步骤接着这后面继续完成就行了。

原创文章 44 获赞 8 访问量 3864

猜你喜欢

转载自blog.csdn.net/weixin_44692299/article/details/105869229
今日推荐