无法删除 Nvidia Linux 模块

无法删除 Nvidia Linux 模块

我正在尝试删除特定的 nvidia linux 模块,但是不起作用:

sudo dpkg --remove --force-remove-reinstreq linux-modules-nvidia-525-5.15.0-84-generic

返回:

Reading database... 
226734 files and directories already installed.
Removing linux-modules-nvidia-525-5.15.0-84-generic (5.15.0-84.93)...   
linux-image-nvidia -5.15.0-84-generic: removing .ko files 
/bin/sh: 0: cannot open ./CLEAN: No such file dpkg: error processing package linux-modules-nvidia-525-5.15.0-84- generic (--remove): 
installed linux-modules-nvidia-525-5.15.0-84-generic package pre-removal script   
subprocess returned error exit status 2 
Errors were encountered during execution: linux-modules-nvidia- 525-5.15.0-84-generic

答案1

在我升级 Ubuntu 23.10 到 24.04 后,发生了这种情况。只需从另一个内核模块(即 6.8.X 内核)复制这两个可执行文件即可。

cd /lib/modules/6.8.0-28-generic/kernel/nvidia-535/bits

然后复制那些缺失的可执行文件

sudo cp BUILD /lib/modules/6.5.0-28-generic/kernel/nvidia-535/bits
sudo cp CLEAN /lib/modules/6.5.0-28-generic/kernel/nvidia-535/bits

然后继续

apt --fix-broken install

相关内容