sudo rosdep init 出错解决方案

错误内容:

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.

解决方案:

sudo mkdir -p /etc/ros/rosdep/source.list.d

进入这个终端:

cd /etc/ros/rosdep/sources.list.d

输入命令:

sudo gedit 20-default.list

复制以下内容到文件中:

# 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

sudo rosdep init 出错解决方案_第1张图片

 输入命令:

rosdep update

sudo rosdep init 出错解决方案_第2张图片

换手机热点:

sudo rosdep init 出错解决方案_第3张图片

多试几次,不要加sudo

在不成功参考这个:https://blog.csdn.net/qq_25368751/article/details/104248464

后边修改

sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py

前面添加

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

 这个我试过,错误更多,第一行是from,要放到它的下一行,但是还有错,我就没加了

换热点试试,就成功了,我是没有修改这个文件的。

 

你可能感兴趣的:(sudo rosdep init 出错解决方案)