E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)

Share:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution) # Problem description ```sh You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: libignition-transport8-dev : Depends: libignition-transport8-log-dev (= 8.4.0-2~focal) but it is not going to be installed ros-noetic-simulators : Depends: ros-noetic-gazebo-ros-pkgs but it is not going to be installed ros-noetic-urdf-sim-tutorial : Depends: ros-noetic-gazebo-ros but it is not going to be installed Depends: ros-noetic-gazebo-ros-control but it is not going to be installed ``` ```sh dpkg: error processing package ros-noetic-urdf-sim-tutorial (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of ros-noetic-desktop-full: ros-noetic-desktop-full depends on ros-noetic-simulators; however: Package ros-noetic-simulators is not configured yet. ros-noetic-desktop-full depends on ros-noetic-urdf-sim-tutorial; however: Package ros-noetic-urdf-sim-tutorial is not configured yet. dpkg: error processing package ros-noetic-desktop-full (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: libgazebo11-dev:amd64 ros-noetic-gazebo-dev ros-noetic-gazebo-plugins ros-noetic-gazebo-ros-pkgs ros-noetic-gazebo-ros ros-noetic-gazebo-ros-control ros-noetic-simulators ros-noetic-urdf-sim-tutorial ros-noetic-desktop-full ``` ```sh ~sudo apt remove gazebo11 Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: gazebo11-plugin-base : Depends: gazebo11 (= 11.12.0-1~focal) but it is not going to be installed libignition-transport8-dev : Depends: libignition-transport8-log-dev (= 8.4.0-2~focal) but it is not going to be installed ros-noetic-gazebo-dev : Depends: gazebo11 but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). ``` # Solution ## Method 1 ```sh sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken sudo apt -f --fix-broken install sudo dpkg --configure --force-overwrite -a sudo apt --fix-broken install ``` ## Mehtod 2 ```sh sudo apt update sudo apt install aptitude sudo aptitude install my_package_name ``` ## Usefull stuff ```sh sudo apt clean sudo apt autoremove sudo dpkg --configure -a sudo apt update software-property-gtk ``` cover

No comments