9

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.

Jonathan
  • 6,507
  • 5
  • 37
  • 47
  • 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 installed` – NumbThumb Jul 27 '17 at 08:53
  • https://answers.ros.org/question/243920/how-to-install-ros-kinetic-ubuntu-1604/ – Ugnius Malūkas Oct 26 '17 at 14:01
  • Same problem, and none of the blow actually works. – Schütze Sep 06 '18 at 11:45

8 Answers8

7

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

Lahiru Karunaratne
  • 2,020
  • 16
  • 18
  • 4
    ROS does not come with Gazebo in general and these are two different developments. Some (meta-)packages have a Gazebo as a dependency like `ros-kinetic-desktop-full`, but `ros-kinetic-desktop` for example has not. – Tik0 May 17 '18 at 06:43
2

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
Gilles-Antoine Nys
  • 1,481
  • 16
  • 21
fet.atas
  • 303
  • 2
  • 10
2

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.

Don Slowik
  • 965
  • 10
  • 18
1

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.)

hiankun
  • 31
  • 3
0

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.

David Warnke
  • 1,078
  • 8
  • 7
  • This isn't an intelligent answer. There are 4 dependencies in the first level only, each branching into 3-4 again and again. It's an endless struggle which takes your time. Do not try this. – Schütze Oct 10 '18 at 13:34
  • @Schütze You don't have to follow every path. Use depth-first search and it should take you to the corrupt package fairly quickly. Maybe I worded it incorrectly. I'll edit it. – David Warnke Oct 18 '18 at 02:38
0

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.

0

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.

sOumyaz D
  • 49
  • 1
  • 3
0

If there is an update on your Linux, you should take it. And then follow the instructions in order. You may need to open new terminal windows after installation.

Alper
  • 1
  • 1