很多人在安装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
之前博主也碰到过,弄了很久,为了避免大家浪费不必要的时间,把经验写出来,这个方法经得住考验,目前来说用起来不会有问题了,废话少说,上干货。
1、执行下面的指令:
sudo mkdir -p /etc/ros/rosdep/sources.list.d
2、继续执行指令:
cd /etc/ros/rosdep/sources.list.d
3、还是执行指令:
sudo gedit 20-default.list
4、将下面内容粘贴进去:
# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
5、执行指令: 管它有没有这个文件,就算是空白的也要执行。
sudo gedit /etc/resolvconf/resolv.conf
6、在文件中添加下面两行
nameserver 8.8.8.8
nameserver 8.8.4.4
7、继续执行指令:
sudo gedit /etc/hosts
8、在文件中添加:
151.101.76.133 raw.githubusercontent.com
9、这时候直接运行:
rosdep update
如果不行,多运行几次。或者换网络,切记不要在长城宽带的环境下安装ROS系统,会丢包。
这一节到此结束了。
若有错误,欢迎指正,技术支持联系方式QQ : 2228398717
欢迎关注公众号:云翔科技教学平台,对应的资料公众号会发布。
有什么不懂的地方也可以联系技术支持微信: