Cannot install ROS2 humble on Ubuntu 22.04 (qt5 dependancies issue)

asked 2023-02-09 03:44:46 -0500

lois_R gravatar image

Hello, I have tried installing ROS2 on my desktop computer running Ubuntu 22.04, following to a T the instructions in the docs. However, I am running into an issue when running

sudo apt install ros-humble-desktop

note that the same error arises if I try to install from the source, following the docs, at this line:

rosdep install --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers" --rosdistro humble

This is the message I get from apt:

> 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:  qtbase5-dev : Depends:
> libqt5concurrent5 (= 5.15.3+dfsg-2)
> but 5.15.3+dfsg-2ubuntu0.2 is to be
> installed
>                Depends: libqt5core5a (= 5.15.3+dfsg-2) but
> 5.15.3+dfsg-2ubuntu0.2 is to be installed
>                Depends: libqt5dbus5 (= 5.15.3+dfsg-2) but 5.15.3+dfsg-2ubuntu0.2 is to be installed
>                Depends: libqt5gui5 (= 5.15.3+dfsg-2) but 5.15.3+dfsg-2ubuntu0.2 is to be installed
>                Depends: libqt5network5 (= 5.15.3+dfsg-2) but
> 5.15.3+dfsg-2ubuntu0.2 is to be installed
>                Depends: libqt5printsupport5 (= 5.15.3+dfsg-2)
> but 5.15.3+dfsg-2ubuntu0.2 is to be
> installed
>                Depends: libqt5sql5 (= 5.15.3+dfsg-2) but 5.15.3+dfsg-2ubuntu0.2 is to be installed
>                Depends: libqt5test5 (= 5.15.3+dfsg-2) but 5.15.3+dfsg-2ubuntu0.2 is to be installed
>                Depends: libqt5widgets5 (= 5.15.3+dfsg-2) but
> 5.15.3+dfsg-2ubuntu0.2 is to be installed
>                Depends: libqt5xml5 (= 5.15.3+dfsg-2) but 5.15.3+dfsg-2ubuntu0.2 is to be installed
>                Recommends: libqt5opengl5-dev (= 5.15.3+dfsg-2)
> but it is not going to be installed E:
> Unable to correct problems, you have
> held broken packages. ERROR: the
> following rosdeps failed to install  
> apt: command [sudo -H apt-get install
> -y qtbase5-dev] failed

I tried using aptitude instead of apt, but it is not helpful at all:

The following packages have unmet dependencies: ros-humble-desktop : Depends: ros-humble-joy but it is not installable Depends: ros-humble-pcl-conversions but it is not installable < Depends: ros-humble-rqt-common-plugins but it is not installable Depends: ros-humble-rviz-default-plugins but it is not installable Depends: ros-humble-rviz2 but it is not installable Depends: ros-humble-teleop-twist-joy but it is not installable The following actions will resolve these dependencies:

Keep the following packages at their current version:

1) ros-humble-desktop [Not Installed]

I have not been able to find any help online. Some people have dependancy issues with base ubuntu packages, that get resolved magically overnight, others install the problematic packages manually.

What can I do ?

edit retag flag offensive close merge delete

Comments

Did you follow the instructions from the installation guide prior to sudo apt install ros-humble-desktop ?

billy gravatar image billy  ( 2023-02-11 16:36:51 -0500 )edit

Hello, yes I followed all the instructions prior. My ubuntu install was only a week old too so it's very weird. Anyways, after fighting for a full day, downgrading packages, etc., I eventually broke my system and had to reinstall some essential ubuntu packages. I ended up accepting that my system is cursed and gave up on installing ROS directly.

Instead, I opted for using LXD containers to emulate a fresh Ubuntu 22.04 install. I installed ROS2 following the exact same steps I did on the host machine, and it worked first try! So there's definitelty some incompatibility issues with ROS dependancies and either VSCode or IntelliJ, the only other external programs I had installed. (for anyone interested on using containers, this is what I did: https://ubuntu.com/blog/install-ros-2... and https://ubuntu.com/blog/ros-developme...).

lois_R gravatar image lois_R  ( 2023-02-12 07:32:19 -0500 )edit

Interesting. If you think VSCode or IntelliJ impacted Humble install, adding those tags to your question may help others that stumble across the same issue in the future. Good you got it fixed.

billy gravatar image billy  ( 2023-02-12 17:15:04 -0500 )edit