0
$\begingroup$

Rosanswers logo

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: http://wiki.ros.org/melodic/Installation/Ubuntu

I am running Ubuntu 18.04


Originally posted by apache8080 on ROS Answers with karma: 1 on 2018-08-01

Post score: 0


Original comments

Comment by gvdhoorn on 2018-08-01:
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.

Comment by apache8080 on 2018-08-01:
I accidentally put the wrong command in my question. I have now updated it.

Comment by gvdhoorn on 2018-08-02:
But did you install Gazebo sometime earlier and from the OSRF repositories?

Comment by dslowik on 2019-10-27:
Use aptitude as explained here. It guides you through fixing dependencies.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Catherine Wong with karma: 56 on 2018-08-18

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by gvdhoorn on 2018-08-19:
Just for reference: you probably ran into UpstreamPackages.

Comment by sonjabrits on 2020-04-21:
Same happened to me, accidentally first installed ros-desktop-full. Your command worked for me :)

$\endgroup$
0
$\begingroup$

Rosanswers logo

I had encountered the same error. I overcome doing the following steps:-

1.This command will remove gazebo9 ,catkin , python-rospkg , python-rospkg-modules packages from your system

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

2.This command will remove packages from your system, for example, to remove ros related files:

sudo apt-get remove ros-*

3.This command will remove packages and their configuration files.

sudo apt-get purge ros-*

4.sudo apt-get remove ros-melodic-desktop-full

5.sudo apt-get purge ros-melodic-desktop-full

6.This command will remove dependencies that are no longer needed.

sudo apt-get autoremove

7.sudo apt-get install -f

8.sudo apt-get update

9.sudo apt-get upgrade

10.Now install ros-melodic-desktop-full

sudo apt install ros-melodic-desktop-full

References:link text


Originally posted by Neeraj Patil with karma: 21 on 2020-05-05

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.