【Debian 12】解决nvidia-driver的依赖问题的方法

最近我一直在使用Debian 12。像往常一样粗略地执行sudo apt update && sudo apt upgrade时,系统提示找不到nviria-driver的依赖包nvidia-driver-dkms的版本,因此我将写下解决方法。

總結

由于一些软件包被分离出来,似乎需要新增非自由固件仓库记录。

+ # 2023-03-20 add non-free-firmware, see Debian's post.
- deb http://deb.debian.org/debian/ bookworm main non-free contrib
+ deb http://deb.debian.org/debian/ bookworm main non-free non-free-firmware contrib
- deb-src http://deb.debian.org/debian/ bookworm main non-free contrib
+ deb-src http://deb.debian.org/debian/ bookworm main non-free non-free-firmware contrib

- deb http://security.debian.org/debian-security bookworm-security main non-free contrib
+ deb http://security.debian.org/debian-security bookworm-security main non-free non-free-firmware contrib
- deb-src http://security.debian.org/debian-security bookworm-security main non-free contrib
+ deb-src http://security.debian.org/debian-security bookworm-security main non-free non-free-firmware contrib

# bullseye-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
- deb http://deb.debian.org/debian/ bookworm-updates main non-free contrib
+ deb http://deb.debian.org/debian/ bookworm-updates main non-free non-free-firmware contrib
- deb-src http://deb.debian.org/debian/ bookworm-updates main non-free contrib
+ deb-src http://deb.debian.org/debian/ bookworm-updates main non-free non-free-firmware contrib

填補

Debian正在讨论从2022年下半年开始在安装程序中是否激活非自由固件(通常是AMD和NVIDIA的GPU驱动程序)。作为结论,他们决定新增非自由固件,与非自由软件分开,将非自由固件移入其中。

作者在本书结尾留下了以下的话。

GNU所說的「自由發行版」與實際效益不相容。就連Minecraft在nouveau上也無法正常運行。這是一個現實中「完全自由」不存在的例子。

当在搜索Minecraft Nouveau:Kernel Rejected Pushbuf时,会相对经常出现与Forge的加载画面相关的情况。