The program 'rostopic' is currently not installed. Held broken packages

asked 2018-11-05 23:25:07 -0600

Unproductive gravatar image

updated 2018-11-06 03:59:07 -0600

gvdhoorn gravatar image

Hi All,

Using ubuntu 16.04 LTS yesterday I believe the machine did an unattended upgrade. The kernel is 4.15.

Now I can't get rostopic list to work -- and the system seems to be nonfunctional.

user@blah:~$ rostopic list
The program 'rostopic' is currently not installed. You can install it by typing:
sudo apt install python-rostopic

If you follow that advice, you get:

The following packages have unmet dependencies:
 python-rostopic : Depends: python-rosbag but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

If you try to install python-rosbag -- you get another similar message for another package. I've tried sudo apt-get dist-upgrade, and it has not fixed it.

Any ideas about solutions?


edit retag flag offensive close merge delete


It looks like you are trying to install the ROS packages from debian upstream instead of a specific version of ROS (see ). If you were using ROS kinetic, this is probably not what you want.

ahendrix gravatar image ahendrix  ( 2018-11-06 01:21:02 -0600 )edit

Maybe check that /opt/ros/kinetic still exists and that you've sourced /opt/ros/kinetic/setup.bash in your shell?

ahendrix gravatar image ahendrix  ( 2018-11-06 01:21:39 -0600 )edit

Hi ahendrix, I have same question, but I am pretty sure I am not using upstream version. I manually installed "rostopic" by "sudo apt-get install ros-kinetc-rosbag". I am just wondering why sudo apt install python-rostopic is jump out?

crazymumu gravatar image crazymumu  ( 2019-11-19 18:34:18 -0600 )edit

rostopic is part of the ros-kinetic-rostopic package. If you want to install the version of rostopic for ROS Kinetic, you should do sudo apt install ros-kinetic-rostopic.

Ubuntu has a feature where it tries to suggest a package from the Ubuntu upstream packages when a command is not found. Since the rostopic command cannot be found and since the upstream python-rostopic package includes it, Ubuntu suggests that package. Ubuntu is not aware that the ros-kinetic-rostopic package also includes the rostopic command, so it does not suggest that package.

ahendrix gravatar image ahendrix  ( 2019-11-19 21:31:07 -0600 )edit