遇到的错误如下
mo@mo-ThundeRobot:~$ sudo rosdep init
ERROR: cannot download default sources list from:
https:
Website may be down.
解决办法
这是由于raw.githubusercontent.com被墙,程序无法下载相应的文件导致的。解决方法就是使得raw.githubusercontent.com能够被正常访问。这个网站被墙的方式是dns污染,所以我们只要能够找到这个网站的正确ip就可以了。
IP地址可能会变,可以去这个网址查一下:ip查询网站 https://site.ip138.com/raw.Githubusercontent.com/
输入 raw.githubusercontent.com 查询IP地址
查到当前IP为:185.199.109.133
但是目前这个IP在https://site.ip138.com/raw.Githubusercontent.com/中查不到了,可以在Microsoft Edge 浏览器中的必应搜索中直接搜索raw.githubusercontent.com ip
如图
查到之后就可以执行:
sudo gedit /etc/hosts
然后把185.199.109.133 raw.githubusercontent.com添加进去,然后保存,然后退出
如图
重新执行sudo rosdep init
此时你可能换过几个IP地址,你的报错内容可能会变成下面这样:
ERROR: default sources list file already exists:
/etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize
这时候你需要执行:
sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
然后再sudo rosdep init
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)