ubuntu 16.04 install ros raise Cannot install kinetic (unmet dependencies)

原始链接

再执行sudo apt install ros-melodic-desktop-full后出现以下错误

Reading package lists... Done

Building dependency tree

Reading state information... Done

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:

ros-kinetic-desktop : 

Depends: ros-kinetic-common-tutorials but it is not going to be installed

   Depends: ros-kinetic-geometry-tutorials but it is not going to be installed
   Depends: ros-kinetic-robot but it is not going to be installed
   Depends: ros-kinetic-ros-tutorials but it is not going to be installed
   Depends: ros-kinetic-urdf-tutorial but it is not going to be installed
   Depends: ros-kinetic-visualization-tutorials but it is not going to be installed
   Depends: ros-kinetic-viz but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

需要再/etc/apt/sources.list添加下列内容,ubuntu18.04把xenial改成Bionic即可

deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse

deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse

deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse

deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse

deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse

deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse

deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse

deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse

然后再按照链接中的1.2往下执行

在1.2步骤我同样使用了USTC镜像

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'

你可能感兴趣的:(ros)