@Ubuntu18.04安装ROS(最好全程用手机热点(手机流量访问外网速度快一点))
设置国内源(中科大)
在这里最好把源更新为国内源(如何更换可以百度一下)
$sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
密钥
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
更新
sudo apt-get update
sudo apt-get upgrade
安装完整版本
sudo apt-get install ros-melodic-desktop-full
安装需要的包
sudo apt-get install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
初始化
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.
解决方案:
#打开hosts文件
sudo gedit /etc/hosts
#在文件末尾添加
151.101.84.133 raw.githubusercontent.com
#保存后退出再尝试
更新
rosdep update
设置环境变量
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
本文地址:https://blog.csdn.net/weixin_44991078/article/details/108179285
您可能感兴趣的文章:
如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!
网友评论