ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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 image gvdhoorn  ( 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 image alex97  ( 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 image gvdhoorn  ( 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 image gvdhoorn  ( 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 image gvdhoorn  ( 2019-02-17 05:18:20 -0500 )edit

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

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

Thanks for the update.

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

gvdhoorn gravatar image gvdhoorn  ( 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 image alex97  ( 2019-02-17 06:21:29 -0500 )edit

2 Answers

Sort by » oldest newest most voted
3

answered 2020-06-21 00:09:12 -0500

arahp gravatar image

updated 2020-06-21 00:18:57 -0500

  • Reason

    Some dependencies are not installed, and the previously installed versions of the dependencies are not correct, some require downgrade, and some require upgrade

    • Install environment

    Use the original sources.list: dep http://ports.ubuntu.com/bionic main res...

    Other sources.list: ustc, tuna... have not been tested

    • Solution

    • Install aptitude

      sudo apt-get install aptitude
      

    2.Install ros-melodic-desktop-full with aptitude

    sudo aptitude install ros-melodic-desktop-full
    

    3.The first prompt reminds us that there are a lot of things that are not installed, about 100-600, let us choose to keep the original ones, but there is no at all, enter n here

    4.The second prompt may ask us to upgrade or downgrade something, this is what we need, choose Y

    5.Select Y to install

    6.After that, “-O APT:::GET::Fix-Missing=true” may appear, execute: sudo apt-get --fix-missing

    7.Repeat a few times from step 1-6, each time you will find that things you need to install will be reduced a lot, and finally, if you have no problem after step 6, it will automatically install ros.

    • It works for me
edit flag offensive delete link more

Comments

I had the same problem installing ros-melodic-desktop-full on fresh Ubuntu 18.04.

Using aptitude saved my day

Yury Rumyantsev gravatar image Yury Rumyantsev  ( 2020-08-31 01:06:08 -0500 )edit
0

answered 2021-05-07 18:27:35 -0500

Provide a possibility 1. Provide a possibility: check the software with the updated server and choose the right 2. Open all software updates and update them. After the update is complete it will reboot and try to install ROS again

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-02-16 14:59:38 -0500

Seen: 4,612 times

Last updated: Jun 21 '20