Melodic fresh install unmet dependencies

asked 2019-02-16 15:11:43 -0500

alex97 gravatar image

updated 2019-02-18 04:30:43 -0500

Hello,

I am trying to install ROS Melodic on a quite fresh (1 week old) Ubuntu 18.04 installation, but have run into a problem with unmet dependencies when following the instructions at http://wiki.ros.org/melodic/Installat... .

The error appears after the command:

alex@alex-XPS-15-9530:~$ sudo apt-get 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-melodic-desktop-full : Depends: ros-melodic-desktop but it is not going to be installed
                            Depends: ros-melodic-perception but it is not going to be installed
                            Depends: ros-melodic-simulators but it is not going to be installed
                            Depends: ros-melodic-urdf-sim-tutorial but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I tried following the dependency tree but after getting 4 levels of dependency in (dependency's dependency and so on) I got the feeling that this is not the right way to install ROS, as it should work just with the steps outlined in the installation instructions.

As per the installation instructions I have:

  • Allowed Ubuntu software to install from "restricted", "universe" and "multiverse
  • configured my sources.list:

    alex@alex-XPS-15-9530:~$ cat /etc/apt/sources.list.d/ros-latest.list deb http://packages.ros.org/ros/ubuntu bionic main

  • Set up the keys

  • Updated my package index and also ran apt upgrade and dist-upgrade

I have checked these two posts with a seemingly similar issue on the forum:

https://answers.ros.org/question/2992... - The OP didn't indicate whether it was resolved, but another person said that they solved the problem by removing previously installed ROS and Gazebo software. I haven't installed anything ROS related on this computer yet.

https://answers.ros.org/question/3067... - This was solved by using aptitude instead of apt. I tried this but aptitude's solution seemed to leave out a lot of ros-melodic packages and after running it I still had no ROS installed.

I also found this: https://askubuntu.com/questions/10419... - I don't know how the OP figured out that libusb was causing the problem. I don't have enough "reputation" to comment on that thread to ask how they did it! Does anyone know how to investigate that?

Now I'm a bit stuck! Does anyone have any ideas?

Any help is much appreciated.

Alex

EDIT

Output of sudo apt-get install ros-melodic-urdf-sim-tutorial:

alex@alex-XPS-15-9530:~$ sudo apt-get install ros-melodic-urdf-sim-tutorial
[sudo] password for alex: 
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 ...
(more)
edit retag flag offensive close merge delete

Comments

What's the output of sudo apt-get install ros-melodic-urdf-sim-tutorial? Seeing that pkg mentioned last makes me think there is some dependency of ros-melodic-urdf-sim-tutorial that is already at a newer version and cannot be downgraded, leading to apt giving up.

gvdhoorn gravatar imagegvdhoorn ( 2019-02-17 04:41:27 -0500 )edit

Thanks for your response. I have added the output of that command as an edit to the original question as it is over the character limit for a comment.

alex97 gravatar imagealex97 ( 2019-02-17 05:09:48 -0500 )edit

Can you please install synaptic and see which packages have a broken status?

Also: what is the output of sudo apt-get install ros-melodic-gazebo-ros? I'm still suspecting Gazebo.

gvdhoorn gravatar imagegvdhoorn ( 2019-02-17 05:10:55 -0500 )edit

I have added the output of that command as an edit to the original question

very good. That is also the only acceptable way to provide more information.

Comments are only for very limited interaction.

gvdhoorn gravatar imagegvdhoorn ( 2019-02-17 05:11:30 -0500 )edit

Have you ever installed anything "interesting" on this machine? Used any PPAs to install newer versions of packages that you wanted to use? That is typically why apt fails to resolve dependencies.

re: following deps 'down': ignoring aptitude, that is the only way I know to approach this.

gvdhoorn gravatar imagegvdhoorn ( 2019-02-17 05:18:20 -0500 )edit

Thanks again for your suggestions, I have edited the original question with the responses.

alex97 gravatar imagealex97 ( 2019-02-17 05:52:23 -0500 )edit

Thanks for the update.

Could you please follow the *-gazebo-dev package?

gvdhoorn gravatar imagegvdhoorn ( 2019-02-17 05:53:39 -0500 )edit

I gave that a go in edit 3 - assuming that is what you meant by follow the package?

alex97 gravatar imagealex97 ( 2019-02-17 06:21:29 -0500 )edit