Can't get anything to install, dependency errors
Solution 1
Output of sudo apt-get update
which you have provided here has two problem
- “Hash sum mismatch” error and
- "GPG ERROR"
These two problem is already discussed here( for "Hash sum mismatch") and here (for "GPG ERROR").
Resolving these two error will solve your problem as you are not able to fetch the latest version of software available be in the respective repo.
Solution 2
To fix that need to do next actions:
- sudo apt-get update
- sudo apt-get install -f
- sudo rm -rf /var/lib/apt/lists/*
- sudo apt-get update
Related videos on Youtube
JacobTheDev
Updated on September 18, 2022Comments
-
JacobTheDev over 1 year
I'm extremely new to Linux/command line stuff, so please forgive my ignorance.
Every time I try to install anything using
sudo apt-get install ...
I get dependency errors. I'm trying to get OpenSSH Server and GitLab installed on my machine, and whenever I type in the commands, I seem to get a dependency error like so:sudo apt-get install openssh-server reading package lists... 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: openssh-server : Depends: libwrap0 (>= 7.6-4~) but it is not installable Recommends: ssh-import-id but it is not installable E: Unable to correct problems, you have held broken packages.
I get similar errors seemingly no matter what I try to install. For example, with
sudo apt-get install git
, the error changes to:The following packages have unmet dependencies: git : Depends: liberror-perl but it is not installable E: Unable to correct problems, you have held broken packages
I'm running Ubuntu Server 12.04 LTS x86. I've tried doing
sudo apt-get clean
,sudo apt-get autoclean
,sudo apt-get update
, and sevveral other similar things. I've tried rebooting, hell, I even wiped out the server and started from scratch with the same issue. I'm sure I'm doing something obviously wrong, but I just can't seem to track it down. If anyone could help, that'd be fantastic.
Update: I did get OpenSSH working by clean installing the server and selecting OpenSSH during set up.
I found this wiki on apt-get so I tried doing
sudo apt-get build-dep git
and got the error:E: Build-Depends-Indep dependency for git cannot be satisfied because package asciidoc has no candidate version
I don't know if that helps determine what's happening.
-
g_p over 9 yearsHave you tried this?askubuntu.com/questions/140246/…
-
JacobTheDev over 9 yearsI haven't, thanks, that looks way more informative than the results I've been getting. I'll give it a shot in the morning.
-
david6 over 9 yearsIs the setup fully updated?
sudo apt-get update && sudo apt-get upgrade
andsudo apt-get dist-upgrade
You should not be getting these errors. Did you verify the Ubuntu install (.iso file)? -
JacobTheDev over 9 years@g_p looks like that works just fine? pastebin.com/jVMRbYJ8
-
JacobTheDev over 9 years
-
JacobTheDev over 9 yearsI'd be happy to give you SSH access if you think you can figure it out; it's a clean install so I've got nothing to lose, haha.
-
g_p over 9 yearsSorry for my late reply. Can you post the complete output of
sudo apt-get update
? -
JacobTheDev over 9 yearsSure: pastebin.com/A2rd0Eaf
-
JacobTheDev over 9 yearsTried do the has sum mismatch one and I get the error
sudo: add-apt-repository: command not found
. for teh GPG ERROR one I getrm: cannot remove
/var/lib/apt/lists/partial': Is a directory` Tried the fix linked for theadd-apt-repository
error but got the same error when running again: linuxg.net/… -
JacobTheDev over 9 yearsActually I was able to fix the
add-apt-repository
issue but I get the error(Y PPA Manager:4580): Gtk-WARNING **: cannot open display:
when trying to run y-ppa-manager -
JacobTheDev over 9 yearsAnd I was able to remvove the partial thing using rmdir (I'm learning!) so now what? I'm still stuck with the "cannot open display" issue.
-
JacobTheDev over 9 yearsOh dang, I just tried installing git-core and it looks like it's working!
-
Fabby over 9 years@g_p: as it seems to be working now, shouldn't you convert this to an answer to get some reward out of this? Rev: As you're a reputation 1 user: If this all works, don't forget to click the grey check-mark under the "0" at the left of the answer by g_p, which means "yes, this answer is valid"! ;-)
-
g_p over 9 years@Fabby, posted it.
-
-
fooquency over 6 yearsThis worked for me, but could you add a clarification as to why the removal of the apt lists directory contents solves this problem?