问题
安装ros执行到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]:
<urlopen error timed out> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
ERROR: error loading sources list:
('The read operation timed out',)
解决思路
首先在网上搜了一会,说修改·/usr/lib/python2.7/dist-packages/rosdep2/
中DOWNLOAD_TIMEOUT
参数的文章较多。 但是看了评论,这种方法治标不治本,还要从根源上找出问题的原因,再寻找其解决方法。
- 首先,报错中提示
urlopen error timed out
, 说明是里面的网址连接超时,应该去找导致这个连接超时的原因 - 发现有许多跟
https://raw.githubusercontent.com
超时相关的文章,指出是因为这个网站被墙了。 - 网站被墙那要么绕过DNS解析,直接访问数字IP地址,要么用代理。
- 更进一步了解,发现
https://raw.githubusercontent.com
的IP经常变化,所以更推荐使用代理网站。 - 之后所采用的方法就如这篇文章 所述。