Ask Your Question

Unmet dependencies when installing Melodic on Ubuntu 18.04

asked 2018-08-01 02:26:32 -0600

apache8080 gravatar image

updated 2018-08-01 10:35:57 -0600

When running: sudo apt install ros-melodic-desktop-full

I get the following error:

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 have followed the instructions here:

I am running Ubuntu 18.04

edit retag flag offensive close merge delete


Do you have Gazebo installed from the osrf repositories by any chance?

When running: sudo rm /var/cache/apt/archives/lock

don't you mean "after running .."? That command only deletes a file, it does not ask apt to install any packages.

gvdhoorn gravatar imagegvdhoorn ( 2018-08-01 04:49:17 -0600 )edit

I accidentally put the wrong command in my question. I have now updated it.

apache8080 gravatar imageapache8080 ( 2018-08-01 10:36:29 -0600 )edit

But did you install Gazebo sometime earlier and from the OSRF repositories?

gvdhoorn gravatar imagegvdhoorn ( 2018-08-02 02:53:25 -0600 )edit

Use aptitude as explained here. It guides you through fixing dependencies.

dslowik gravatar imagedslowik ( 2019-10-27 14:40:16 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2018-08-18 23:51:32 -0600

Catherine Wong gravatar image

I had the same problem. For me, I ran sudo apt-get install ros-desktop-full before I realized that is not Melodic. I removed that afterwards but I had the same error when I tried to install with sudo apt-get install ros-melodic-desktop-full.

I think the error came from the fact that I had rospkg 1.1.4 instead of 1.1.7 when I installed ros_desktop_full. I did

sudo apt-get remove gazebo9* catkin python-rospkg python-rospkg-modules

(Here, I also removed gazebo9 related packages and catkin that were installed with ros-desktop-full.) Afterwards, I tried to install the melodic desktop full version again and it worked for me.

edit flag offensive delete link more


Just for reference: you probably ran into UpstreamPackages.

gvdhoorn gravatar imagegvdhoorn ( 2018-08-19 02:27:07 -0600 )edit

answered 2019-02-08 04:58:37 -0600

Configure your Ubuntu repositories properly and try further.

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2018-08-01 02:26:32 -0600

Seen: 2,785 times

Last updated: Aug 18 '18