E: 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
解决:
ps -e | grep apt
然后会出现几个进程号,如1932 ?
执行:sudo kill 进程号
4)安装ROS完整版:(由于使用Rviz,PCL等模块,请务必安装完整版):
!在安装之前强烈建议换源,我换的是中科大的源
备份原始数据
cd /etc/apt/
sudo cp sources.list sources.list.bak
sudo gedit sources.list
科大源:
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
换源后执行:
sudo apt-get install ros-kinetic-desktop-full
这一步可能要比较久,可以尝试再换源
sudo apt-cache search ros-kinetic
5)初始化ROS:
sudo rosdep init
rosdep update
!可能会遇到问题:
sudo rosdep init ERROR: cannot download default sources list from:【closed】
解决方案一:
sudo gedit /etc/hosts
在文件末尾添加151.101.84.133 raw.githubusercontent.com
保存后退出再尝试
解决方案二:
建立一个文件夹/etc/ros/rosdep/sources.list.d 就一直sudo mkdir **** cd ***
#os-specific listings first yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx #generic yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte #newer distributions (Groovy, Hydro, …) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead