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

Revision history [back]

Hi I had this same issue for ROS Humble Ubuntu 22.04. I did some digging and managed to get a solution, that worked for me. See below:

My dependencies

$ sudo apt install ros-humble-desktop       
Reading package lists... Done
Building dependency tree... Done
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.
apt : Depends: libapt-pkg6.0 (>= 2.4.5) but it is not going to be installed
           Depends: libsystemd0 but it is not installable
     bsdutils : PreDepends: libsystemd0 but it is not installable
     dconf-gsettings-backend : Depends: dconf-service (< 0.40.0-3.1~)
                               Depends: dconf-service (>= 0.40.0-3)
     init : PreDepends: systemd-sysv
     libcolord2 : Depends: libudev1 (>= 196) but it is not installable
     libdbus-1-3 : Depends: libsystemd0 but it is not installable
                   Recommends: dbus
     libgudev-1.0-0 : Depends: libudev1 (>= 199) but it is not installable
     libhwloc15 : Depends: libudev1 (>= 183) but it is not installable
     libignition-cmake2-dev : Depends: cmake
     libinput10 : Depends: libudev1 (>= 183) but it is not installable
                  Depends: libinput-bin (>= 1.20.0-1ubuntu0.1)
     libopenmpi-dev : Depends: openmpi-bin (>= 3.0.0-1)
                      Recommends: libcoarrays-openmpi-dev but it is not going to be installed
     libopenni2-0 : Depends: libudev1 (>= 183) but it is not installable
     libpulse0 : Depends: libsystemd0 but it is not installable
     libqt5gui5 : Depends: libudev1 (>= 183) but it is not installable
     libudev-dev : Depends: libudev1 (= 249.11-0ubuntu3) but it is not installable
     libusb-1.0-0 : Depends: libudev1 (>= 183) but it is not installable
     mpi-default-bin : Depends: openmpi-bin
     ros-humble-ament-cmake : Depends: cmake
     ros-humble-ament-cmake-core : Depends: cmake
    ros-humble-foonathan-memory-vendor : Depends: cmake
    shim-signed : Depends: grub-efi-amd64-signed but it is not going to be installed or
                            grub-efi-arm64-signed but it is not installable
                   Depends: grub2-common (>= 2.04-1ubuntu24)
     util-linux : PreDepends: libsystemd0 but it is not installable
                  PreDepends: libudev1 (>= 183) but it is not installable
    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Reinstalled dependencies by sending stdout to file:

$ sudo apt install ros-humble-desktop &> ROS-install-ERR.txt

I tried reinstalling MY dependencies and missing programs that were listed in ROS-install-ERR.txt

$ sudo apt install --reinstall libapt-pkg6.0 libsystemd0 dconf-service systemd-sysv libudev1 dbus libinput-bin libcoarrays-openmpi-dev grub-efi-amd64-signed grub2-common
$ sudo apt-get install cmake

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

Solution Install aptitude:

$ sudo apt-get install aptitude

1.

$ sudo aptitude install ros-humble-desktop

You should see a list of dependencies and a proposed action:

The following packages have unmet dependencies:

 ros-humble-desktop : Depends: ros-humble-action-tutorials-cpp but it is not installable
      <Dependencies listed>

The following actions will resolve these dependencies:

     Keep the following packages at their current version:

         ros-humble-desktop [Not Installed]

2. The first prompt reminds us that there are a lot of things that are not installed let us choose No:

Type: N

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

Type: Y

4.

It will then ask you to install ROS files:

Type: Y

5. After that ROS should install automatically.

If however, it presents the following message "-O APT:::GET::Fix-Missing=true" you must execute:

$ sudo apt-get --fix-missing

Repeat Steps 1-5 until you no longer receive this error message.

Hope this helps! Credit where credit is due: User: arahp https://answers.ros.org/question/315820/melodic-fresh-install-unmet-dependencies/