ros安装遇sudo rosdep init,rosdep update

1. 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.

解决方法:
建立一个文件夹/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

2.rosdep update

报错信息:

reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:

解决办法:
1.命令行中输入以下代码:

sudo gedit /etc/resolv.conf

修改resolv.conf,改成下面两句:

nameserver 8.8.8.8 #google域名服务器

nameserver 8.8.4.4 #google域名服务器

2. 修改hosts:

sudo gedit /etc/hosts

添加如下行:

151.101.84.133  raw.githubusercontent.com

保存后执行:

sudo rosdep update

第三四步骤为网络延迟问题
3.
增加TIMEOUT的时间:
更改 /usr/lib/python2.7/dist-packages/rosdep2/下的三个文件sources_list.py、gbpdistro_support.py、rep3.py
中的DOWNLOAD_TIMEOUT = 15.0值,改大一点就可以了。

sudo vim /usr/lib/python2.7/dist-packages/rosdep2/gbpdistro_support.py

然后利用vim的搜索功能输入:/DOWNLOAD_TIMEOUT搜索到这一行,修改过后输入:wq保存退出就行了。
4.

sudo apt-get update
sudo apt-get install python-rosdep

第三四步骤为网络延迟问题

参考文章:ros安装过程中出现rosdep update ERROR的解决办法
http://wiki.ros.org/cn/kinetic/Installation/Ubuntu

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值