Can you try to install it by sudo apt-get install ros-melodic-husky-gazebo
?
You can try to use this tutorial to find and fix broken packages (if this is OS problem). From the article:
To fix broken packages on Debian-based
distributions using APT:
- Open the terminal and enter:
sudo apt --fix-missing update
- Update your system's package list from the available sources:
sudo
apt update
- Now, force the installation of the broken packages using the -f flag.
APT will automatically search for
broken packages on your system and
reinstall them from the official
repository:
sudo apt install -f
If the aforementioned steps do not
work for you, then you can try to
solve the issue using dpkg
.
Force dpkg to reconfigure all the pending packages that are already
unpacked but need to undergo
configuration: sudo dpkg --configure
-a
Use the --remove flag to delete all the broken packages: sudo dpkg
--remove --force-remove-reinstreq
- Clean up the package cache and install scripts using apt clean:
sudo
apt clean
- Now, update your system's package lists using the following command:
sudo apt update
If it doesn't help, you can try to use rosdep
(sudo apt-get install python-rosdep
) to install missing dependencies (ROS Wiki there):
Go to the top directory of your catkin workspace where the source code of the ROS packages you'd like to use are. Then run:
rosdep install --from-paths src --ignore-src -r -y
This command "magically" installs all the packages that the packages in your catkin workspace depend upon but are missing on your computer.
You should remember to configure your Ubuntu repositories to allow restricted
, universe
, and multiverse
too (maybe you missed this step without noticing during installation).