1、配置源
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
更換國內源:
sudo sh -c 'echo "http://mirrors.ustc.edu.cn/ros/ubuntu/ $(lsb_release -sc) main" >
因 Debian 中沒有 /etc/lsb_release,因此不能使用官方提供的方法。
2、設置 key
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
3、安裝
sudo apt-get update
sudo apt-get install ros-lunar-desktop-full
4、初始化 rosdep
sudo rosdep init
rosdep update
在執行 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.
參考sudo rosdep init出錯的解決方案處理方法。
首先確認了系統網絡無法訪問 :
raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
因此設置代理服務器, sudo vim /etc/environment :
export http_proxy=http://192.168.1.100:6666
export https_proxy=http://192.168.1.100:6666
此時即可訪問 raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
再次執行:
sudo apt-get update
sudo -E rosdep init
rosdep update
配置成功。