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