the rosdep view is empty: call ‘sudo rosdep init‘ and ‘rosdep update‘

10 篇文章 1 订阅
4 篇文章 0 订阅

目录

主要问题描述

解决方法

问题1:ERROR: default sources list file already exists:

解决方法

问题2: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.

解决方法

问题3:rosdep update一直timeout

解决方法


主要问题描述:

在使用ros时,出现了一个警告“the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'”,虽然不影响使用,但是看得很闹心。

原因:

未知。目前产生原因还没有一个定论,就看做是一个小点的bug吧。问题不大

好像因为是最近update抽风了,无数的人都出现问题了,安装ros也失败了。

解决方法:

依次运行以下代码

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

很小的概率能一次成功。可能会出现各种稀奇古怪的问题,下面就各种问题进行一个总结。

问题1:ERROR: default sources list file already exists:

ERROR: default sources list file already exists:
/etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize

原因:

20-default.list已经存在,需要删除。

解决方法:

运行以下代码,再运行sudo rosdep init

sudo rm /etc/ros/rosdep/sources.list.d/20-default.list

问题2: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.

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.

原因:

报错原因是GitHub的raw.githubusercontent.com无法连接

需要解决GitHub的raw.githubusercontent.com无法连接问题

解决方法:

通过IPAddress.com首页,输入raw.githubusercontent.com查询到真实IP地址

如:

修改hosts Ubuntu,记下查找到的任意ip,执行:

sudo vi /etc/hosts

在底部添加以下内容保存即可

185.199.108.133 raw.githubusercontent.com

然后输入sudo rosdep init就可以了

若依旧下载不了,则替换为:

199.232.28.133 raw.githubusercontent.com

151.101.228.133 raw.github.com

问题3:rosdep update一直timeout

reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit http://github.com/ros/rosdistro/raw/master/rosdep/osx-homebrew.yaml

ERROR: unable to process source [http://github.com/ros/rosdistro/raw/master/rosdep/base.yaml]:

<urlopen error _ssl.c:489: The handshake operation timed out> (http://github.com/ros/rosdistro/raw/master/rosdep/base.yaml)

ERROR: error loading sources list:
    The read operation timed out

原因:

链接超时,可能是网络波动,或者其他莫名的原因

解决方法:

方法1:

sudo gedit /etc/resolv.conf

将原有的name注释掉,再添加上

nameserver 8.8.8.8
nameserver 8.8.4.4

如果上述方法不管用,则尝试方法2

方法2:

更改 /usr/lib/python2.7/dist-packages/rosdep2/下的三个文件sources_list.pygbpdistro_support.pyrep3.py
中的DOWNLOAD_TIMEOUT = 15.0值,修改为115或者更大

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

 再运行rosdep update就可以了。

方法3:

手机开热点,或者或者换个网络

方法4:

由于最近update实在没招,所以只能另辟蹊径了

找到一个相同版本已经安装好ros的电脑。

复制     /etc/ros/rosdep/sources.list.d/20-default.list    文件到相同位置

复制   .ros/rosdep/sources.cache/    内的文件到相同位置

可以启动小乌龟,是可以用的。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值