rosdep update报错ERROR: error loading sources list: (‘The read operation timed out‘,)解决


在安装ros过程中,rosdep update几乎每次遇到报错:

ERROR: error loading sources list: (‘The read operation timed out’,)

报错如下图所示:

在这里插入图片描述

解决方法:

1.手动下载rosdep包

git clone https://gitee.com/francois_WAN/rosdistro.git  

2.进入目录/etc/ros/rosdep/sources.list.d下

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

在这里插入图片描述
赋予编辑权限:

sudo chmod 777 * -R

将下载的rosdistro文件移动到ros文件夹下:
在这里插入图片描述

3.对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

替换为:

#os-specific listings first
yaml file:///etc/ros/rosdistro/rosdep/osx-homebrew.yaml osx
#generic
yaml file:///etc/ros/rosdistro/rosdep/base.yaml
yaml file:///etc/ros/rosdistro/rosdep/python.yaml
yaml file:///etc/ros/rosdistro/rosdep/ruby.yaml
gbpdistro file:///etc/ros/rosdistro/releases/fuerte.yaml fuerte
#newer distributions (Groovy, Hydro, …) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

4.进入到 /usr/lib/python2.7/dist-packages/rosdep2/文件夹下

cd /usr/lib/python2.7/dist-packages/rosdep2/
  1. 对文件gbpdistro_support.py进行修改:
sudo gedit gbpdistro_support.py

#location of an example gbpdistro file for reference and testing
FUERTE_GBPDISTRO_URL = ‘file:///etc/ros/rosdistro/releases/fuerte.yaml’

  1. 对同一文件夹下的 rep3.py文件进行修改:
sudo gedit rep3.py

#location of targets file for processing gbpdistro files
REP3_TARGETS_URL = ‘file:///etc/ros/rosdistro/releases/targets.yaml’

  1. 对 /usr/lib/python2.7/dist-packages/rosdistro/文件夹下的 gedit __init__.py文件进行修改:
cd /usr/lib/python2.7/dist-packages/rosdistro/
sudo gedit __init__.py

#index information
DEFAULT_INDEX_URL = ‘file:///etc/ros/rosdistro/index-v4.yaml’

5.再次执行 rosdep update:

在这里插入图片描述

6.运行成功!

其他问题可参考:

https://blog.csdn.net/learning_man/article/details/119766435

  • 5
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 8
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值