3

I'm trying to fix a broken system and work out what dependencies are missing. I ask apt-get about a package:

jon@jon-laptop:/var/log/apt$ sudo apt-get install -s openssh-server
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:
 libumfpack5.7.1 : Depends: libcholmod3.0.6 but it is not going to be installed
 openssh-server : Depends: openssh-client (= 1:7.1p2-2)
                  Depends: openssh-sftp-server but it is not going to be installed
                  Recommends: ssh-import-id but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Ok, so the above says libcholmod3.0.6 is missing. So then I check it with:

jon@jon-laptop:/var/log/apt$ sudo apt-get install -s libcholmod3.0.6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libcholmod3.0.6 is already the newest version (1:4.4.6-1).
libcholmod3.0.6 set to manually installed.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

So this says it is installed... what's the deal?

thanks!

Jon
  • 171
  • Which Ubuntu are you running? (useful for package versions and dependencies) –  Jul 28 '16 at 07:24
  • Ubuntu 16.04 (xenial) – Jon Jul 28 '16 at 10:28
  • Duplicate from here, which answer is a duplicate from an accepted answer here. –  Jul 28 '16 at 10:39
  • Ah yes, thanks. The underlining issue in mine was that the mirror stopped being updated altogether (http://ubuntu.uhost.hk/) – Jon Jul 28 '16 at 10:51
  • My problem's symptoms are different (apt-get update worked just fine) though the solution was the same (kind of). Should I still confirm it as duplicate then? – Jon Jul 28 '16 at 11:02
  • Well, a difference is that you are actually asking why this problem arises. The other questions don't. So, as long as you are expecting also that answer, this might be good in itself. If you are only interested in solving the problem, then it is a clear duplicate imo. –  Jul 28 '16 at 11:27
  • Same problem, http://askubuntu.com/questions/765518/ubuntu-16-04-broken-packages-after-fresh-install/766206#766206 – al0s Oct 10 '16 at 05:10

2 Answers2

1

Try to run

sudo apt-get -f install
1

I still don't quite get apt-get's output here, but I resolved the underlining issue by changing the Ubuntu mirror I was using.

The old mirror was: http://ubuntu.uhost.hk/
I changed to: http://ftp.cuhk.edu.hk/pub/Linux/ubuntu

It was an official mirror, but stopped being updated (outdated by 2.5 months so far!). I think I may have changed to the mirror after already updating to packages newer than the mirror. Hence why apt-get was so confused (as was I!).

Jon
  • 171
  • 1
    Can you be more precise about what exactly did you do? Otherwise, it is not helpful to anyone else who might face this issue in the future. –  Jul 28 '16 at 10:55
  • Which repository were you using and to which one did you change, if you don't mind. – B. Turan Jul 28 '16 at 10:56
  • Ok, I've added the addresses of the mirrors – Jon Jul 28 '16 at 11:06