banner
Aki

Aki

太阳能维修,月亮可更换,星星不闪包退换。
twitter

Error occurs when executing apt update on Debian 11 with Debian bookworm.

Description#

As the title suggests, an error occurred during the execution of apt update in Debian 11, specifically related to Debian bookworm.
The error message is as follows:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Repository 'Debian bookworm' changed its 'non-free component' value from 'non-free' to 'non-free non-free-firmware'
N: More information about this can be found online in the Release notes at: https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.html#non-free-split

The reason behind this is that the change in version caused a modification in the non-free component of the apt source. According to the warning description, the file content of sources.list should be modified by changing "non-free" to "non-free-firmware".
Of course, if you have already modified the domestic source, you still need to check the component in the public source list to ensure its correctness. In general, modifying sources.list according to the description of the open-source apt source should not cause this problem (isn't this obvious?)

There are exceptions to everything, otherwise it wouldn't be recorded.

The machine I am using is in an intranet environment, where a source mirror is deployed and the source component address is accessed through proxy forwarding. In this case, modifying the file may still cause problems.
For example:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Skipping acquire of configured file 'non-free-firmware/source/Sources' as repository 'http://repos.inside.com:19796/debian bullseye-updates InRelease' doesn't have the component 'non-free-firmware' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'non-free-firmware/binary-amd64/Packages' as repository 'http://repos.inside.com:19796/debian bullseye-updates InRelease' doesn't have the component 'non-free-firmware' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'non-free-firmware/i18n/Translation-en' as repository 'http://repos.inside.com:19796/debian bullseye-updates InRelease' doesn't have the component 'non-free-firmware' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'non-free-firmware/i18n/Translation-zh_CN' as repository 'http://repos.inside.com:19796/debian bullseye-updates InRelease' doesn't have the component 'non-free-firmware' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'non-free-firmware/i18n/Translation-zh' as repository 'http://repos.inside.com:19796/debian bullseye-updates InRelease' doesn't have the component 'non-free-firmware' (component misspelt in sources.list?)

For security reasons, I made up the address, but in reality, this method is used to locate the remote source component in order to enable apt updates and installations on intranet devices.
In this case, the information provided by apt is that the address does not have the non-free-firmware component. This means that I cannot achieve apt updates by simply modifying "non-free" to "non-free-firmware".

This is also the reason why it is mentioned above to check the components of the Debian source on the source address page.

I've talked too much nonsense. Here is the solution.

Solution#

The classic way to solve a problem you can't find a solution to is to solve the "person" who raised the problem, in this case, preventing apt from giving warnings.

su -c 'echo "APT::Get::Update::SourceListWarnings::NonFreeFirmware \"false\";" > /etc/apt/apt.conf.d/no-bookworm-firmware.conf'

After executing the above command, you can perform apt updates and install other packages.

Reference

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.