关于ERROR: error loading sources list: The read operation timed out 的解决方法

在ubuntu 20.04系统下ROS平台安装时,初始化rosdep报错,在进行

rosdep update

出现超时报错

reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: error loading sources list:
	The read operation timed out

参考网上各种方法,依然无法解决,直到找到以下博客找到问题,链接如下:

https://blog.csdn.net/leida_wt/article/details/115120940?utm_medium=distribute.pc_relevant_download.none-task-blog-2~default~BlogCommendFromBaidu~default-4.nonecase&depth_1-utm_source=distribute.pc_relevant_download.none-task-blog-2~default~BlogCommendFromBaidu~default-4.nonecas

按照该文方法执行rosdep update,仍然出现超时错误,进而想到直接在sources.list.d中直接添加https://ghproxy.com/前缀,具体操作如下:

连接手机热点,打开终端执行

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

修改list内容

# os-specific listings first
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx

# generic
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://ghproxy.com/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

再运行rosdep update,问题解决。

ubuntu@ubuntu:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Add distro "foxy"
Add distro "galactic"
Skip end-of-life distro "groovy"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in /home/ubuntu/.ros/rosdep/sources.cache

  • 38
    点赞
  • 146
    收藏
    觉得还不错? 一键收藏
  • 13
    评论
### 回答1: 错误:错误加载源列表:<urlopen错误<urlopen错误超时>(https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)>。 这个错误通常是由于网络连接问题引起的。请检查您的网络连接是否正常,并确保您可以访问https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml。如果您的网络连接正常,但仍然无法访问该网址,请尝试使用代理或更改您的DNS设置。 ### 回答2: 这种错误通常出现在使用 ROS(机器人操作系统)时,当你使用命令更新软件时,会出现 error loading sources list: <urlopen error <urlopen error timed out> (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)> 的错误提示。这种错误提示通常表明网络连接不畅或无法连接到远程服务器。 如何解决这个问题?首先,你需要确认你的网络连接是否正常,可能你的网络连接速度过慢导致请求超时。如果你的网络出现了问题,重新连接网络或者更改网络环境可能会解决这个问题。 其次,此类错误通常是由于服务器故障造成的,这个服务器是 ROS 官方的软件仓库,你可以到 ROS 论坛查看是否有其他人在报告相似的问题。如果是服务器故障,你只能暂时等待服务器修复,一旦问题解决你就可以再次更新软件。 最后,你可以考虑更改软件源地址为其他可用的源,尝试手动更改软件源地址来修复这个问题。ROS 默认的软件源不只有一个,你可以从仓库列表里选择其他可用的源,然后更改软件源地址,这有时可以解决网络连接问题。 总之,error loading sources list: <urlopen error <urlopen error timed out> (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)> 错误提示是一个常见的 ROS 错误,常常是由于网络连接问题或服务器故障造成的。通过确认网络状态、等待服务器修复或更改软件源地址,你可以解决这个问题,让你可以顺利更新 ROS 还有它相关的软件。 ### 回答3: 这个错误信息说明在加载ROS软件包的源列表时出现问题,具体是因为连接GitHub上的源出现了超时错误。 在使用ROS软件包时,需要从互联网上下载软件包的源代码或二进制文件,这些源列表通常存储在GitHub或其他网站上。当我们使用“rosdep update”命令来更新源列表时,ROS系统会尝试从指定的网址下载源列表,并更新本地存储的源列表文件。 然而,当ROS系统无法连接到指定网址时,就会出现“urlopen errortimed out”的错误信息。这种情况通常是因为网络不稳定或网址被墙了,由于网络状况的不稳定,导致ROS系统无法成功获取源列表,进而无法正常使用软件包。 解决这个问题的方法有多种途径,包括: 1. 检查网络连接:首先应该先检查网络是否正常连接,有没有被防火墙或代理服务器所限制,可以尝试使用其它网络重新连接。 2. 更改ROS源:可以更改ROS的软件源,从国内源或其它可用的源地址获取源代码或二进制文件。 3. 手动下载更新:如果网络不稳定或网络问题无法解决,那么可以考虑手动下载ROS源列表,并将其替换掉本地存储的源列表文件,手动解决更新问题。 总之,出现这样的错误主要是因为与源服务器连接异常,需要找出网络问题并解决,或者更改软件源地址,从而保障应用程序的正常运行。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值