1

This is a very odd problem I've been experiencing lately, it seems to happen a lot and i'm very worried things are gonna start breaking worse than they have already. This problem has happened a lot but here is just one example:

sudo apt-get install openvpn-systemd-resolved 

Here's the output:

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:
 openvpn-systemd-resolved : Depends: libnss-resolve but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

And when i try sudo apt-get install libnss-resolve

This is what i get:

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:
 libnss-resolve : Depends: systemd (= 237-3ubuntu10.3)
E: Unable to correct problems, you have held broken packages.

But systemd is obviously installed with a higher version!

apt show systemd

Shows me that:

Package: systemd
Version: 237-3ubuntu10.9
Status: install ok installed

I need a fix for this problem as soon as possible.. I haven't been able to install a lot of packages because there always seems to be a "you have held broken packages." message popping up.

And YES before you say it, I've already tried all of these(without any error output):

sudo apt --fix-broken install
sudo dpkg --configure --pending
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt update --fix-missing

This has happened once before with libgtk-3-0 and removing/reinstalling the package did eventually work but you can imagine the pain i had to go through to fix everything after removing it(libgtk-3-0 is a dependency for a lot of other packages). Is there a fix? downgrading my packages, especially core ones like systemd is the last thing i want to do.

4
  • The pain you had to go through (and must now go through again) was entirely self-inflicted. "Impossible situation" and "held broken packages" mean that you unwisely added a non-Ubuntu source that is providing packages incompatible with your release of Ubuntu. Avoid doing that.
    – user535733
    Jan 12, 2019 at 15:32
  • @user535733 I'm so ashamed to see this already had an answer, My mistake for not searching hard enough. I've checked out the duplicate posts and they have helped fix most of the incompatibilities. A thanks to those who pointed out the duplicates, and an apology for the dumb title.
    – Xosrov
    Jan 12, 2019 at 16:25
  • @Xosrov I am having the same issue. What ended up fixing it for you?
    – A Tyshka
    Nov 18, 2020 at 14:16
  • @ATyshka I removed all other repositories and reinstalled affected packages with APT... I'm not sure exactly how I did it but it was fixed. (Sorry for the later reply btw)
    – Xosrov
    Nov 24, 2020 at 6:52

0

Browse other questions tagged .