How to fix ros2 humble broken packages

I recently installed ros humble in my linux and some of the simple commands were not working such as

  • ros2 topic list
  • ros2 node list

when I ran the upgrage ros command (sudo apt upgrade ros-humble-*), I got the following error:

Does anyone know how to fix these broken packages?

Hi @rshailly,

One of the messages says that ros-humble-ros-gzharmonic-bridge conflicts with ros-humble-ros-gz-bridge.

If you remove the installed package that is causing the issue, the problem may be solved for this specific error.

Another possible solution is to remove ROS Humble completely and install it from zero. This way, you would get the latest packages.

Just be careful if removing ROS Humble completely, to avoid removing basic dependencies.

By the way, if you want to know the package that you have installed, just use dpkg -l to list the installed packages, and use grep to search the package installed.

Example:

sudo dpkg -l | grep ros-humble-ros-gz
1 Like

Hi @ralves,

thank you for your prompt reply. As you advised, I removed and installed ROS completely. The error was gone after restarting the computer post ROS installation.

Thank you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.