ROS安装过程遇到的问题及解决方法

任务

成功安装Ubuntu后,乘胜追击,安装ROS系统.
根据我下载Ubuntu的18.04版本长期支持至2023年,同时,相对应的ROS的Melodic版本也长期支持至2023年.固下载此版本.
根据官网的指示一步步安装即可.
但简要的几个步骤也是坎坷不断,辗转下,终获成功.

rosdep update 失败

$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 104] Connection reset by peer> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit 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 104] Connection reset by peer> (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 104] Connection reset by peer>
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
ERROR: error loading sources list:
<urlopen error <urlopen error [Errno 104] Connection reset by peer> (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)>

在更改时间限制有所好转但仍未成功后,明确得知,是网络原因.
可以尝试***更换网络***,用***手机热点连接***等方式解决.
我身边没有合适网络,忍痛决定,购买代理,最终一次成功.
success

The following packages have unmet dependencies: python-rosinstall

最后一步安装依赖包,总提示无法安装。

 python-rosinstall : Depends: python-vcstools (>= 0.1.38) but it is not going to be installed
                     Depends: python-wstool (>= 0.1.12) but it is not going to be installed
                     Depends: mercurial but it is not installable
E: Unable to correct problems, you have held broken packages.

通过步骤包含的链接http://wiki.ros.org/rosinstall,可以自主完成下载

首先通过下载pip,按照官方下载指导,直接命令行输入

sudo apt-get install python-pip

pip基本工具需要这种安装方法即可成功完成,下一步是

sudo pip install -U rosinstall

同样出现问题如下:

ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.

此问题同样是网络原因,通过pip下载默认访问国外网站资源,国内网络访问超时。这篇博客方法有效:更改pip源 / 解决 ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read
通过在安装命令中加入-i [pip 源]即可访问国内镜像网站快速下载资源。例如,如下命令表示通过豆瓣镜像网站https://pypi.douban.com/simple安装rosinstall

 sudo pip install -i https://pypi.douban.com/simple rosinstall

就此,完成基本的工具下载。

  • 2
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 8
    评论
连接失败的错误信息"\[Errno 104\] Connection reset by peer"通常表示与服务器的连接被对方重置了。这可能是由于多种原因引起的,包括网络问题、服务器问题或防火墙限制等。要解决这个问题,可以尝试以下几种方法: 1. 检查网络连接:确保你的网络连接正常,可以尝试重新连接或重启网络设备。 2. 检查URL链接:确保你输入的URL是正确的,并且没有被防火墙或其他安全设置所限制。 3. 检查服务器状态:如果你无法连接到特定的服务器,可能是服务器出现了问题。你可以尝试连接其他服务器或联系服务器管理员以获取更多信息。 4. 检查防火墙设置:如果你使用的是受限网络,可能是防火墙设置限制了你的连接。你可以尝试使用代理服务器或者联系网络管理员以获取更多信息。 5. 更新pip版本:如果你在使用pip时遇到连接问题,可以尝试更新pip版本。你可以使用以下代码查询pip所支持的whl版本:\[2\] import pip._internal.pep425tags print(pip._internal.pep425tags.get_supported()) 这些方法可以帮助你解决连接失败的问题。如果问题仍然存在,建议你查看详细的错误日志或联系相关技术支持以获取更多帮助。 #### 引用[.reference_title] - *1* [解决urllib.error.URLError: <urlopen error [Errno 104] Connection reset by peer>](https://blog.csdn.net/zcyzcyjava/article/details/127077149)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [error: <urlopen error [Errno 104] Connection reset by peer> Failed building wheel for shellcheck-...](https://blog.csdn.net/G_yc1995/article/details/118345907)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值