9
votes

The sequence of steps listed in http://wiki.ros.org/kinetic/Installat... have been followed. (Trying to install ROS kinetic in Ubuntu 16.04) Error when entering the following command :

$sudo apt-get install ros-kinetic-desktop-full

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-full : Depends: ros-kinetic-desktop but it is not going to be installed Depends: ros-kinetic-perception but it is not going to be installed Depends: ros-kinetic-simulators but it is not going to be installed Depends: ros-kinetic-urdf-tutorial but it is not going to be installed E: Unable to correct problems, you have held broken packages.

7
Having more or the less the same issue. Before opening a new thread I'm adding my error code here: The following packages have unmet dependencies: ros-kinetic-desktop-full : Depends: ros-kinetic-desktop but it is not going to be installed Depends: ros-kinetic-simulators but it is not going to be installedNumbThumb
Same problem, and none of the blow actually works.Schütze

7 Answers

6
votes

I had the same problem because I have installed Gazebo before ROS. If you have done the same thing, then you might get this error.

You can simply uninstall Gazebo and its dependencies, and then try installing the full version of ROS. Gazebo is usually included in the full versions of ROS. If it is not included in your version, then after installing ROS, you can install Gazebo.

Remove Gazebo:

sudo apt-get remove gazebo9

"gazebo9" has to be replaced with your version of Gazebo.

And then remove its dependencies

sudo apt-get autoremove

This command will remove all the unnecessary dependencies. After that, install ROS using the official documentation. Hope this will help you.

Note: ROS full versions comes with Gazebo

2
votes

After upgrading ubuntu 14.04 to 16.04 I run into the same issue. Adding following package sources to /etc/apt/sources.list worked for me. So just do sudo gedit /etc/apt/sources.list copy paste following lines. Apply steps from 1.2 to 1.7 in this link

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
2
votes

sudo aptitude install ros-kinetic-desktop-full

aptitude will display solutions to the unmet dependencies. Just keep hitting 'n' until you get one that installs ros (without wiping out something you need).

aptitude vs apt-get -the way software should function.

1
votes

I solved the problem by installing ros-kinetic-desktop first, and then ros-kinetic-desktop-full.

Recently I have reinstalled my system (Ubuntu/Lubuntu 16.04) and then ROS several times. As I can remember, installing only ros-kinetic-desktop never cause any problem, but installing ros-kinetic-desktop-full always throw "no catkin_pkg error" when I invoking catkin_make. (It can be solved by pip install catkin_pkg.)

This time I installed ros-kinetic-desktop-full in LXLE (based on Lubuntu 16.04) and got the "unmet dependencies error". I solved it as mentioned at the beginning. (But the "no catkin_pkg error" still needs the pip solution.)

0
votes

I had this problem after upgrading to Ubuntu 18.04. My problem turned out to be a corrupted python-catkin-pkg.

In general the fix is... just try to install one of those dependencies, and a dependency of the dependency, in a depth-first search fashion. Eventually you will get a package that installs but the dependent package will not. The one that installs successfully is your corrupt package. Remove it and try to install ros again. Repeat if there are more corrupt packages.

It might be worth a try to uninstall ros and any related packages you installed with it, then running sudo apt-get autoremove, then reinstalling all of your ros stuff. I didn't test this though.

0
votes

I got the same error when I was installing ROS Melodic Morenia on ubuntu 18.04. After I recursively tried to install the unmatched dependency, I found installed libopenjp2-7 pakcage version unmatched the required version, which was 2.3.0-1-Xenial but required 2.3.0-1. I uninstalled and reinstalled it, ROS installed successfully. My ubuntu 18.04 was ungraded from 16.10, maybe it was the cause.

-1
votes

Configure your Ubuntu repositories properly and try further.

https://help.ubuntu.com/community/Repositories/Ubuntu

Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse." You can follow the Ubuntu guide for instructions on doing this.

If not you can look into earlier python versions and dependencies.