rosdep update 失败解决办法

在安装ros时会用到rosdep update命令,在开始会有几个文件正常的获取到,然后就是错误,这里说一下解决办法,其实我们只要把他需要的文件放在本地,并修改文件的访问路径,就可以了,操作如下:

首先使用git命令获取文件:

git clone https://github.com/ros/rosdistro.git

此时终端可能提示未安装git,按照终端的提示安装git即可

接着,在根目录下会多出一个文件夹,名字叫rosdistro 

首先修改文件:/usr/lib/python3/dist-packages/rosdep2/rep3.py

文件中修改成:

REP3_TARGETS_URL = 'file:///home/name/rosdistro/releases/targets.yaml'

路径中的name是你计算机的名称

接着修改第二个文件:/usr/lib/python3/dist-packages/rosdistro/__init__.py.

修改为:

DEFAULT_INDEX_URL = 'file:///home/name/rosdistro/index-v4.yaml'

最后修改第三个文件: /etc/ros/rosdep/sources.list.d/20-default.list

修改为:

# os-specific listings first

yaml file:///home/name/rosdistro/rosdep/osx-homebrew.yaml osx

# generic

yaml file:///home/name/rosdistro/rosdep/base.yaml
yaml file:///home/name/rosdistro/rosdep/python.yaml
yaml file:///home/name/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/name/rosdistro/releases/fuerte.yaml fuerte

# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

然后重新运行:

rosdep update

问题解决 

 

你可能感兴趣的:(胡春旭,git,github)