ubuntu18.04 安装 ros 报错 E: Unable to locate package ros-kinetic-desktop-full
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update
sudo apt install ros-melodic-desktop-full
sudo rosdep init
rosdep update
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
#保存后退出再尝试
ERROR: error loading sources list:
('The read operation timed out',)
解决方法
# 添加代理
rm rosdep_update.sh ; wget https://gitee.com/ncnynl/rosdep/raw/master/rosdep_update.sh ; sudo chmod +x ./rosdep_update.sh; sudo ./rosdep_update.sh
rosdep update
# 取消代理
rm rosdep_recover.sh ; wget https://gitee.com/ncnynl/rosdep/raw/master/rosdep_recover.sh ; sudo chmod +x ./rosdep_recover.sh; sudo ./rosdep_recover.sh
成功截图
对应的文件
在三个不同终端输入验证
roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key
成功
本文来自博客园,作者:变秃了也就变强了,转载请注明原文链接:https://www.cnblogs.com/lichangyi/p/17812603.html