ubuntu18 ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/ros

本文解决了一个关于ROS系统中无法处理源列表数据的问题,通过手动添加GitHub的IP地址到hosts文件来绕过连接被拒绝的错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题描述

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)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml]:
	Failed to download target platform data for gbpdistro:
	<urlopen error [Errno 111] Connection refused>
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
ERROR: error loading sources list:
	<urlopen error <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)>

在这里插入图片描述

问题原因

问题原因不是很清楚,之前看哪些博文的时候记得好像说是
“因为某些众所周知的原因,啥啥啥dns污染所以找不到[https://raw.githubusercontent.com”

解决方法

第一步:不明所以
不清楚是什么情况,首先先确认下有没有这个文件夹,如果没有依次创建

/etc/ros/rosdep/sources.list.d

第二步:手动添加ip
域名ip查询
输入 raw.githubusercontent.com
结果不出意外是这个
在这里插入图片描述然后从里面挑一个ip地址加上 raw.githubusercontent.com

151.101.76.133 raw.githubusercontent.com

将这个写进下面的文件里,最上面的那个是最优先查询的,建议添加中国香港的ip

sudo gedit /etc/hosts

然后就可以了

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值