sudo apt-get (something) is not working
Solution 1
I just found out a solution to the problem. I had to open terminal and type in
sudo dpkg --configure -a
There had been interruptions in the dpkg, and that solved the problem.
Solution 2
Alright, this is a classic case of dependency mess-up.
First off, go to your Software Sources app and make sure that main
, universe
, and multiverse
(optional) are all enabled.
Then, go back to your terminal and run the below command to refresh your package cache:
sudo apt update
Follow this up with these commands exactly as they appear below to upgrade your system and to clean up your dependency mess:
sudo apt -f install
sudo apt full-upgrade
sudo apt -f install
If this still doesn't work, we're going to have to resort to other tools, namely aptitude
. As your apt
is broken, we're going to have to manually install this. Visit this page and choose the most appropriate version of aptitude
and download it. This is likely going to be xenial amd64
, but check your system.
Then, run the following command to install aptitude
on your system:
sudo dpkg -i <whatever you downloaded>.deb
Then, run:
sudo aptitude -f
Aptitude's dependency resolution/fixing system is slightly more complicated than Apt's, and as such is a lot more likely to fix any problems you may be encountering.
Related videos on Youtube
BONEPIEBONEPIE
Updated on September 18, 2022Comments
-
BONEPIEBONEPIE over 1 year
when I try to download something, I use
sudo apt-get install/upgrade (package)
However, this gives me error messages:
$ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: google-chrome-stable : Depends: libpango1.0-0 (>= 1.14.0) but it is not installed Depends: libappindicator1 but it is not installed E: Unmet dependencies. Try using -f.
So, I tried using
-f
.sudo apt-get -f install (package)
and there is still an error message.
Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: 0ad : Depends: 0ad-data (>= 0.0.20) but it is not going to be nstalled Depends: 0ad-data (<= 0.0.20-1) but it is not going to be installed Depends: 0ad-data-common (>= 0.0.20) but it is not going to be installed Depends: 0ad-data-common (<= 0.0.20-1) but it is not going to be installed Depends: libenet7 but it is not going to be installed Depends: libgloox13v5 but it is not going to be installed Depends: libnvtt2 but it is not going to be installed Depends: libopenal1 (>= 1.14) but it is not going to be installed Depends: libsdl2-2.0-0 (>= 2.0.4) but it is not going to be installed Depends: libwxbase3.0-0v5 (>= 3.0.2+dfsg) but it is not going to be installed Depends: libwxgtk3.0-0v5 (>= 3.0.2+dfsg) but it is not going to be installed google-chrome-stable : Depends: libpango1.0-0 (>= 1.14.0) but it is not going to be installed Depends: libappindicator1 but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
How can I fix this?
-
Yaron about 7 yearsdid you try running
sudo apt-get -f install
? -
BONEPIEBONEPIE about 7 yearsYes, I have tried.
-
Kaz Wolfe about 7 yearsDo you have any PPAs on your system? If so, which ones?
-
BONEPIEBONEPIE about 7 yearsSorry, but how should I check for PPAs?
-
Admin about 7 yearsHave you tried just running
sudo apt-get dist-upgrade
(upgrades more than justupgrade
)? And are you sure that your package list is up-to-date (sudo apt-get update
)? -
BONEPIEBONEPIE about 7 yearsthere is still that same message. that I should try apt-get -f. But when I try it, it gives the same message again.
-
psusi about 7 yearsYou need to omit the <package> argument after apt-get install -f.
-
BONEPIEBONEPIE about 7 yearsthen how do I install packages?
-
Kaz Wolfe about 7 years@user654662 You just use
sudo apt install <package>
.sudo apt -f install
is meant only as a recovery/fix tool, not as a way to install things. Seeman apt
andman apt-get
.
-
-
TheCleverIdiot about 7 yearsWhen apt is broken (or dpkg has been interrupted) there's no point in trying to install anything else using... APT.] Please read the other answers in order to understand the problem and the solutions.