安装ros中出现的问题记录

安装了18.04.6后发现以前安装ros的方法出现了问题,首先

Err:8 http://archive.ubuntu.com/ubuntu bionic/universe amd64 freeglut3-dev amd64 2.8.1-3
  Connection failed [IP: 91.189.88.152 80]
Err:9 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libfreexl1 amd64 1.0.5-1
  Connection failed [IP: 91.189.88.152 80]
Err:10 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libfyba0 amd64 4.1.1-3
  Connection failed [IP: 91.189.88.152 80]
Err:11 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libgeos-3.6.2 amd64 3.6.2-1build2
  Connection failed [IP: 91.189.88.152 80]

这个问题主要是网站被墙了,导致无法访问,因此换源即可,这里提供一种简单的操作
在

在软件与升级中换成阿里云即可,华为云跟清华云也差不多,一般比较安全
接下来是

sudo apt update
sudo apt-get install ros-melodic-desktop-full
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo apt install python-rosdep
sudo rosdep init

我在这一步出现了问题

ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.

这个其实也是因为网站被墙,换热点的方法行不通,因此需要换ip,思路就是在host文件中添加网站的ip地址.
解决方法:

sudo gedit /etc/hosts

打开host文件后,在文件的最末尾添加:

151.101.84.133  raw.githubusercontent.com

保存并关闭文件,再执行sudo rosdep init,可以看到

sudo rosdep init
Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run

	rosdep update

至此就顺利解决啦

原博文连接:http://wiki.ros.org/melodic/Installation/Ubuntu

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值