1

Detailed answer


I am trying to install the package Debian firmware-misc-nonfree on a particular Linux installation.

╰─○ apt install firmware-misc-nonfree
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package firmware-misc-nonfree is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'firmware-misc-nonfree' has no installation candidate

And something seems to be holding it back, yet on two other systems it is fine.

This is the output of apt-cache policy

╰─○ apt-cache policy firmware-misc-nonfree
firmware-misc-nonfree:
  Installed: (none)
  Candidate: (none)
  Version table:
     20210315-3 -1
         -1 http://uk.mirrors.clouvider.net/debian bullseye/non-free amd64 Packages

Is there some way automated way to find the cause of the conflict?

These are the contents of /etc/apt/sources.list

# updated 2023-03-11-1956 for Debian 11 Bullseye

deb http://uk.mirrors.clouvider.net/debian/ bullseye main contrib non-free
deb-src http://uk.mirrors.clouvider.net/debian/ bullseye main contrib non-free

deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free

# bullseye-updates, previously known as 'volatile'
deb http://uk.mirrors.clouvider.net/debian/ bullseye-updates main contrib non-free
deb-src http://uk.mirrors.clouvider.net/debian/ bullseye-updates main contrib non-free

# deb http://uk.mirrors.clouvider.net/debian/ bullseye-backports main contrib non-free
# deb-src http://uk.mirrors.clouvider.net/debian/ bullseye-backports main contrib non-free

The only thing I can think of is that this installation os a VirtualBox system and that the virtualization may have something to do with it.

It needs some binary firmware which is not in the proper directory, but I can copy it from the other systems into its proper place where it can be loaded at boot time.

Does the Debian packaging system maintain a log of the commands issued when the installation of a package triggers a hold, the removal or block of another?

I have tried some of the suggestions at https://askubuntu.com/questions/640986/how-to-get-a-list-of-installed-packages-held-back-from-upgrade but the commands don't show anything.

4

4 Answers 4

2

apt-cache policy firmware-misc-nonfree shows the package is available with priority -1. -1 prevents it to be selected as candidate among multiple candidates (even if it's the only candidate). From apt_preferences(5):

How APT Interprets Priorities

[...]

P < 0

prevents the version from being installed

You can still override the setting by stating a candidate version yourself. For example this should install the package:

apt-get install firmware-misc-nonfree=20210315-3

Chances are some settings about apt's preferences were changed. The first places to look would be /etc/apt/preferences or in /etc/apt/preferences.d/.

1
  • I checked the /etc/apt/preferences.d directory and found a non_free_policy file which has the Pin-priority: - 1. Some other process may have changed it, and I suspect that VirtualBox changes some settings to avoid problems with the hosts settings.
    – vfclists
    Apr 25, 2023 at 23:08
1

The package firmware-misc-nonfree can be downloaded from: https://packages.debian.org/sid/all/firmware-misc-nonfree/download. That the latest. If you want the older bullseye package, use: https://packages.debian.org/bullseye/all/firmware-misc-nonfree/download.

It can be installed with: dpkg -i .

If you run: apt-file list firmware-misc-nonfree, it will show all the files in the package and their locations under the /lib/firmware directory.

The /var/log/apt directory holds the history of apt activity.

1

What happened is that Debian has moved various bits of non-free firmware into its own repository tree, separate from non-free, because several of those are unfortunately too vital for a lot of modern systems, especially laptops, to omit by default.

Update your sources as follows:

deb http://uk.mirrors.clouvider.net/debian/ bullseye main contrib non-free

to

deb http://uk.mirrors.clouvider.net/debian/ bullseye main contrib non-free non-free-firmware

and you should see the package again.

1
  • After adding the non-free-firmware source apt-update produces a lot of errors such as W: Skipping acquire of configured file 'non-free-firmware/binary-amd64/Packages' as repository 'http://ftp.uk.debian.org/debian bullseye InRelease' doesn't have the component 'non-free-firmware' (component misspelt in sources.list?). I suspect the problem must still be something in the configuration. The non-free-firmware option must be for bookworm, so I suppose I must add a separate entry for non-free-firmware pointing to bookworm
    – vfclists
    Apr 20, 2023 at 8:54
0

After following the suggestions in the selected answer I discovered that /etc/apt/preferences.d directory had the file non_free_policy which had the contents:

Explanation: Disable packages from non-free tree by default
Package: *
Pin: release o=Debian,a=stable,l=Debian,c=non-free
Pin-Priority: -1

It seems the Debian installer sets this priority for non-free packages by default, and it is probably why I have had to compile more than few wireless and bluetooth drivers in the past.

I wonder how many users have fallen foul of this setting over the years without knowing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .