1、错误描述:

ming@ming:~$ rosdep update

reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: unable to process source [https://raw.githubusercontent/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
ERROR: unable to process source [https://raw.githubusercontent/ros/rosdistro/master/rosdep/base.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent/ros/rosdistro/master/rosdep/base.yaml)
ERROR: unable to process source [https://raw.githubusercontent/ros/rosdistro/master/rosdep/python.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent/ros/rosdistro/master/rosdep/python.yaml)
ERROR: unable to process source [https://raw.githubusercontent/ros/rosdistro/master/rosdep/ruby.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent/ros/rosdistro/master/rosdep/ruby.yaml)
Hit https://raw.githubusercontent/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent/ros/rosdistro/master/index-v4.yaml
Add distro "ardent"
ERROR: error loading sources list:
    <urlopen error <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent/ros/rosdistro/master/ardent/distribution.yaml)>


解决办法:

sudo gedit /etc/resolv.conf

将原有的nameserver这一行注释,并添加以下两行:

nameserver 8.8.8.8 #google域名服务器

nameserver 8.8.4.4 #google域名服务器

保存退出,执行

sudo  apt-get update

再执行

rosdep update

出现:

就代表一切OK了!

2、错误描述:
ming@ming:~$ sudo rosdep init 
ERROR: default sources list file already exists:
/etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize

解决办法:

执行以下命令,删除已经存在的初始化文件:

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

然后再重新运行

sudo rosdep init

问题解决。

如果问题还是没有解决,请参考这位博主的方法安装ROS, 初始化时rosdep update出错解决办法_super_sean的博客-CSDN博客_rosdep update出错https://blog.csdn/super_sean/article/details/105433250其中心思想是把20-default.list中需要下载的文件,预先下载下来,然后在20-default.list文件中指明文件路径,从而绕开网络下载这一环。相关文件下载链接也在这位博主(好人)博客中列出来了,大家可以快速下载。

如果最后还是rosdep update不成功,可以选择关机重启试试看,一般都会很快通过!最后祝大家好运。

 如果还是解决不了,可以参考下面这个博客,有点麻烦,但肯定能解决。

(成功)ROS安装过程中如何解决 rosdep update 命令出现错误——安装记录_小张小张快来学习的博客-CSDN博客

更多推荐

ubuntu安装ROS进行到rosdep update时出现错误,如ERROR: unable to process source ...