Robotics StackExchange | Archived questions

Unmet dependencies for ros desktop full

Same Question

I have posted this exact same question on AskUbuntu here.

Error

I'm trying to install the ros desktop full version on my pc following these steps. Everything is all right until step 1.4, precisely

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

Where i'm given the following error:

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-simulators but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Dependency tree

I'll report here the whole dependency tree, where i used the command sudo apt-get install for all the dependencies on the left of each list element. I followed first the simulators dependency:

Then i followed the desktop dependency:

As you can see both point to the same package. But when using

 sudo apt-get install python-pyqt5

I get

python-pyqt5 is already the newest version (5.8.2+dfsg-1+16.04+xenial+build21).

What I've tried

  1. Manually adding the following deb to /etc/apt/sources.list

    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. Installing python-pyqt5 with pip3 install pyqt5

  3. Using upgrade, update, dist-update multiple times with apt

  4. Installing ros-kinetic-ros-base, which gave me no dependencies errors

  5. Using sudo apt-get install python-pyqt5=5.8.2+dfsg-1+16.04+xenial+build19 Gives the following output before accepting installation:

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Starting pkgProblemResolver with broken count: 1
    Starting 2 pkgProblemResolver with broken count: 1
    Investigating (0) python-pyqt5.qtsvg [ amd64 ] < 5.8.2+dfsg-1+16.04+xenial+build21 > ( python )
    Broken python-pyqt5.qtsvg:amd64 Depends on python-pyqt5 [ amd64 ] < 5.8.2+dfsg-1+16.04+xenial+build21 -> 5.8.2+dfsg-1+16.04+xenial+build19 | 5.8.2+dfsg-1+16.04+xenial+build21 > ( python )(= 5.8.2+dfsg-1+16.04+xenial+build21)
    Considering python-pyqt5:amd64 10002 as a solution to python-pyqt5.qtsvg:amd64 1
    Removing python-pyqt5.qtsvg:amd64 rather than change python-pyqt5:amd64
    Investigating (0) ros-kinetic-python-qt-binding [ amd64 ] < 0.3.3-0xenial-20171104-175930-0800 > ( misc )
    Broken ros-kinetic-python-qt-binding:amd64 Depends on python-pyqt5.qtsvg [ amd64 ] < 5.8.2+dfsg-1+16.04+xenial+build21 > ( python )
    Considering python-pyqt5.qtsvg:amd64 1 as a solution to ros-kinetic-python-qt-binding:amd64 0
    Removing ros-kinetic-python-qt-binding:amd64 rather than change python-pyqt5.qtsvg:amd64
    Investigating (0) ros-kinetic-rviz [ amd64 ] < 1.12.15-0xenial-20180105-172609-0800 > ( misc )
    Broken ros-kinetic-rviz:amd64 Depends on ros-kinetic-python-qt-binding [ amd64 ] < 0.3.3-0xenial-20171104-175930-0800 > ( misc )
    Considering ros-kinetic-python-qt-binding:amd64 0 as a solution to ros-kinetic-rviz:amd64 -1
    Removing ros-kinetic-rviz:amd64 rather than change ros-kinetic-python-qt-binding:amd64
    Done
    Suggested packages:
       python-pyqt5-dbg
    The following packages will be REMOVED:
       python-pyqt5.qtsvg ros-kinetic-python-qt-binding ros-kinetic-rviz
    The following packages will be DOWNGRADED:
       python-pyqt5
    0 upgraded, 0 newly installed, 1 downgraded, 3 to remove and 0 not upgraded.
    Need to get 2.143 kB of archives
    

More infos

I have the KDE neon LTS 5.8 installed with the following specs:

Here I'll list every command i think it may be usefull followed by its output:

$ cat /etc/apt/sources.list.d/ros-latest.list 
deb http://packages.ros.org/ros/ubuntu xenial main

$ uname -a
Linux Ublion16 4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9 22:00:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ apt-cache policy python-pyqt5
 python-pyqt5:
 Installed: 5.8.2+dfsg-1+16.04+xenial+build21
 Candidate: 5.8.2+dfsg-1+16.04+xenial+build21
 Version table:
 *** 5.8.2+dfsg-1+16.04+xenial+build21 500
        500 http://archive.neon.kde.org/user/lts xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     5.8.2+dfsg-1+16.04+xenial+build19 500
        500 http://archive.neon.kde.org/user/lts xenial/main amd64 Packages
     5.8.2+dfsg-1+16.04+xenial+build13 500
        500 http://archive.neon.kde.org/user/lts xenial/main amd64 Packages
     5.7+dfsg-3+16.04+build8 500
        500 http://archive.neon.kde.org/user/lts xenial/main amd64 Packages
     5.5.1+dfsg-3ubuntu4 500
        500 http://it.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://mirrors.ustc.edu.cn/ubuntu xenial/universe amd64 Packages

Asked by nicofirst1 on 2018-01-14 10:45:10 UTC

Comments

One possibility is that you have a PPA (or other pkg repository) that offers a newer (and incompatible) version of python-pyqt5.qtwebkit, which is why things aren't installing. Try to figure out where your current python-pyqt5.qtwebkit is coming from.

Asked by gvdhoorn on 2018-01-14 12:23:04 UTC

Installing python-pyqt5 with pip3 install pyqt5

Please don't do that. You now have multiple versions of Python pyqt5 on your system, one of which is probably not managed by your system's package manager, but is interfering with the Ubuntu provided one.

Also: Python 3 is not used by ROS.

Asked by gvdhoorn on 2018-01-14 12:24:41 UTC

Hi @gvdhoorn, thanks for your response. The error is stating that i need the 5.8.2+dfsg-1+16.04+xenial+build19 of python-pyqt5 but i have the t 5.8.2+dfsg-1+16.04+xenial+build21 , could it be the thing you're talking about? How and where can I check the build version location?

Asked by nicofirst1 on 2018-01-15 04:14:55 UTC

See what the output of apt-cache policy python-pyqt5 is.

Add it to your original question (use the edit button/link).

Asked by gvdhoorn on 2018-01-15 04:18:22 UTC

@gvdhoorn done, the build version is still the wrong one

Asked by nicofirst1 on 2018-01-15 04:25:30 UTC

From the output of apt-cache policy you appear to have a repository (archive.neon.kde.org) that provides that newer version. Do you know why you have that repository?

I'm not entirely sure, but it could well be that this is causing the conflict you're seeing.

Asked by gvdhoorn on 2018-01-15 05:47:04 UTC

I forgot to specify that my machine is running KDE neon LTS 5.8.8, i think that is the default repository @gvdhoorn

Asked by nicofirst1 on 2018-01-15 06:09:46 UTC

Well, then it could be that having both installed is not possible, if indeed the different version of python-pyqt5 is the problem here. If neon pins the version of python-pyqt5 to that specific version, and the ROS pkgs pin it to the other one, than that would be a problem.

Asked by gvdhoorn on 2018-01-15 06:12:16 UTC

Is there a solution to this problem?

Asked by nicofirst1 on 2018-01-15 06:13:58 UTC

Not an official one I believe, but I'm not an expert. I'd suggest you try to search Google a bit.

Installing two versions of the same package is impossible.

A source install of ROS could be an option, but seems like a rather involved work-around.

Asked by gvdhoorn on 2018-01-15 06:15:39 UTC

Following the unmet dependencies to the core i found out that

What is the package that depends on python-pyqt5 here? Do you have the chain of packages that depends on it?

Asked by gvdhoorn on 2018-01-15 06:16:24 UTC

Another workaround is to not install desktop_full, but only the packages that you need. If those packages do not need python-pyqt5, then it should avoid the problem.

But I'm expecting rviz to be one of the dependents, so that would be a rather important package to be missing.

Asked by gvdhoorn on 2018-01-15 06:17:27 UTC

I'll edit the question specifying the dependency chain in a bit. Speaking of desktop-full i was able to install ros-kinetic-ros-base with atp (but i stopped it since i need the full one)

Asked by nicofirst1 on 2018-01-15 06:20:01 UTC

ros_base is a subset of desktop_full. There is no need to stop the installation, as all packages in desktop_full will need ros_base to be installed anyway.

Asked by gvdhoorn on 2018-01-15 06:22:24 UTC

I'll install it in a moment. Something weird has happened, i was tracing back the installation errors until i got to ros-kinetic-rviz (which has given me problems), but now i was able to install it without dependencies errors...I'll try to install the full version as soon as rviz is done.

Asked by nicofirst1 on 2018-01-15 06:29:42 UTC

Never mind, i installed it and it's giving me the same error as before

Asked by nicofirst1 on 2018-01-15 06:34:30 UTC

To see whether something on your system really needs that particular version of python-pyqt5, you could try:

sudo apt-get install python-pyqt5=5.8.2+dfsg-1+16.04+xenial+build19

This could have consequences, so pay careful attention to the output of apt-get.

Asked by gvdhoorn on 2018-01-15 06:52:26 UTC

Note btw that this is not really a "ROS problem".

It is a problem for you, trying to install ROS, but in reality this is a more generic problem trying to deal with two (large) software systems needing different versions of a shared dependency.

Asked by gvdhoorn on 2018-01-15 06:53:24 UTC

If installing the older version of python-pyqt5 does cause issues, you could consider installing just the pkgs that need it from source (ie: building it in a Catkin workspace), while installing the rest with apt.

It's a bit of work, but not as much as building all of ROS from source.

Asked by gvdhoorn on 2018-01-15 07:20:51 UTC

I edited the question adding the output of the command sudo apt-get install python-pyqt5=5.8.2+dfsg-1+16.04+xenial+build19 before installing... should i continue? As for the "ROS problem" should i post this question somewhere else? Maybe stackOverflow or AskUbuntu?

Asked by nicofirst1 on 2018-01-15 07:21:54 UTC

should i continue?

I hope you'll forgive me if I don't answer with a yes or no here :) I cannot predict (fully) what will happen, and don't want to be responsible for breaking your system.

should i post this question somewhere else?

The question is a bit localized (ie: neon + ROS ..

Asked by gvdhoorn on 2018-01-15 07:24:24 UTC

.. can't be installed together (easily)).

It probably wouldn't hurt to pose this question to some people more experienced in these matters, which may be members of AskUbuntu, yes.

If you do decide to do that, please report back with whatever the outcome is of that, to keep things connected.

Asked by gvdhoorn on 2018-01-15 07:25:59 UTC

Thanks for your help @gvdhoorn, before performing the apt-get command I'll ask on askUbuntu, if i do manage to resolve this issue I'll post the answer here too

Asked by nicofirst1 on 2018-01-15 07:50:10 UTC

Please also post if you don't end up resolving it.

At least there will be some closure to this issue then.

Post the link to your AskUbuntu question in any case.

Asked by gvdhoorn on 2018-01-15 07:51:16 UTC

Answers

I just spent a few hours getting this to work, and the solution turned out to be simple. First just install the qt binding:

sudo apt-get install ros-kinetic-python-qt-binding

Then everything installed fine!

Asked by neuronet on 2018-10-01 21:09:36 UTC

Comments

This is a slightly old question, but if you stumble on this with Ubuntu 20.04 Focal I found the offending package by doing this:

  1. Look at the output and see which package it says won't be installed.
  2. Try to install that package.
  3. Repeat step 1 and 2 until you get another error.

Basically walk down the dependency "tree" to the root an eventually you will get a package that has an actual reason for not installing.

For me, on a a fully up to date Ubuntu 20.04 Focal install, it was depending on libsodium23-1.0.18-1, but there was already a package installed called libsodium23-1.0.18-1-... With "..." being some Ubuntu related text.

The solution was to run:

apt install --reinstall libsodium23=1.0.18-1

This basically replaced the existing package reference with the more generic one without changing anything.

Asked by ChrisL8 on 2020-07-25 11:24:21 UTC

Comments

Late to the game upgrading, but this worked for me. However my incorrect package was fixed with apt install --reinstall libignition-common3=3.10.0-1~focal

Asked by bgreenberg on 2021-01-26 19:16:00 UTC

When I updated Ubuntu from 18.04 to 20.04 and tried installing ros-noetic, I got the same error and apt-get did not show any meaningful message, but using aptitude did some help,

sudo aptitude install ros-noetic-desktop-full

It provided a list of all packages with unmet dependencies in the following manner-

The following packages have unmet dependencies:
libpcre3-dev : Depends: libpcre3 (= 2:8.39-12build1) but 2:8.44-2+ubuntu18.04.1+deb.sury.org+1 is installed
libpcre2-dev : Depends: libpcre2-8-0 (= 10.34-7) but 10.36-2+ubuntu18.04.1+deb.sury.org+2 is installed

It also provided some suggestions which could resolve the issue but after accepting those it came up with the following message

No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

and the issue was still unresolved. Then, I myself downgraded those packages using the following commands,

sudo apt install --reinstall libpcre3=2:8.39-12build1

sudo apt install --reinstall libpcre2-8-0=10.34-7

After that apt install worked for me.

Asked by akp72 on 2021-02-17 13:28:57 UTC

Comments

I just has the same issue, from a fresh Ubuntu Ubuntu 20.04.2 LTS and I tried all the previous solutions. The only thing that worked was activating the pdates form all sources and types and upgrade with the update manager. Why? No idea, but thats how it got soved

Asked by RDaneelOlivaw on 2021-02-26 13:35:45 UTC

Comments