感谢方法来源
在安装ROS时sudo rosdep init 下载问题
解决网址被墙
如果在这操作之前没有瞎XX搞过之前,成功的可能性还是挺大的,如果按照某些教程一项一项搞过,现在改完hosts还是不成功的话,建议像我一样重装系统,装完系统在装ROS前就把hosts改了
sudo gedit /etc/hosts
在最后一行添加
151.101.108.133 raw.githubusercontent.com
注意!
ip可能会变,使用前先打开这个网址
看能否打开
这个网址打开内容为
# 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
如果打不开自行去这个网址查找raw.githubusercontent.com能用的IP
WIN10系统的hosts位置
C:\WINDOWS\system32\drivers\etc
其余类上