0

Some things i try to install give me a "held broken packages error", eg. MyCroft (and quite a few others)

I have tried the usual:

apt-get update, upgrade, dist-upgrade, autoremove & -f install

Doesn't help.

I get nothing from...

dpkg --get-selections | grep hold

Running Synaptic fix broken packages, says everything is fine

Attempting to force installation using Aptitude, and it wants to pretty much uninstall my entire OS lol

Also some installations say i have unment dependencies, which are already installed, even the exact version requested (eg. libasound2-dev)

Running out of ideas? Are there other ways to fix broken/held packages?

Ubuntu 20.04

J M
  • 11
  • 1
    Please [edit] your question and add the exact error message. There can be multiple reasons of dpkg showing held broken packages even if everything is fine, for example, dependency issues, version mismatch, conflicts from PPA, etc. – Kulfy Jul 23 '20 at 16:04
  • 1
    "Held broken packages" does not mean that the packages are corrupt or don't work. It means that you are trying to install a wrong version, breaking the apt dependency logic, and causing it to hold back conflicting packages. The solution is to install a version that is compatible with 20.04, not forcing. – user535733 Jul 23 '20 at 16:12
  • 1
    As i mentioned at the bottom, those supposedly held packages are already installed, and the exact version requested - will update question with full error tomorrow – J M Jul 23 '20 at 23:29

1 Answers1

0

First, try sudo apt autoclean.

Secondly, try sudo apt remove the mis-versioned package then re-install it. Or simply brute force it by removing and re-installing all of the packages listed in the held broken packages error message:

sudo apt-get install example

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: example : Depends: apple (= 7:4.2.2-1ubuntu1) Depends: banana (= 7:4.2.2-1ubuntu1) but it is not going to be installed Depends: cherry (= 7:4.2.2-1ubuntu1) Depends: lemon (= 7:4.2.2-1ubuntu1) but 7:4.2.4-1ubuntu0.1 is to be installed Depends: lime (= 7:4.2.2-1ubuntu1) but it is not going to be installed

Remove and re-install these packages.

sudo apt remove apple
sudo apt remove banana
sudo apt remove cherry
sudo apt remove lemon
sudo apt remove lime

sudo apt autoremove

sudo apt-get install example

J.Dubbs
  • 11