How to solve E: Unable to correct problems, you have held broken packages.
Straight dump of the console output:
student@robot-teaching-lab9:~$ rostopic list
Command 'rostopic' not found, but can be installed with:
sudo apt install python-rostopic
student@robot-teaching-lab9:~$ sudo apt install python-rostopic
[sudo] password for student:
Reading package lists... Done
Building dependency tree
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:
python-rostopic : Depends: python-rospy but it is not going to be installed
Depends: python-rosbag but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
student@robot-teaching-lab9:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 89 not upgraded.
student@robot-teaching-lab9:~$ rostopic list
Command 'rostopic' not found, but can be installed with:
sudo apt install python-rostopic