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

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.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml)
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/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.com/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.net/super_sean/article/details/105433250其中心思想是把20-default.list中需要下载的文件,预先下载下来,然后在20-default.list文件中指明文件路径,从而绕开网络下载这一环。相关文件下载链接也在这位博主(好人)博客中列出来了,大家可以快速下载。

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

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

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

  • 131
    点赞
  • 466
    收藏
    觉得还不错? 一键收藏
  • 76
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 76
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值