如何获取 DKMS 管理的软件包(及其版本)列表,以便我可以轻松添加/删除它们?
答案1
我相信您正在寻找的命令是dkms status
.例如:
% dkms status
virtualbox, 4.1.18: added
在另一个安装了更多 DKMS 模块的系统上:
% dkms status
fglrx, 8.960, 3.2.0-33-generic-pae, i686: installed
fglrx, 8.960, 3.2.0-34-generic, i686: installed
fglrx, 8.960, 3.2.0-34-generic-pae, i686: installed
fglrx, 8.960, 3.2.0-35-generic, i686: installed
fglrx, 8.960, 3.2.0-35-generic-pae, i686: installed
fglrx, 8.960, 3.2.0-36-generic, i686: installed
fglrx, 8.960, 3.2.0-36-generic-pae, i686: installed
fglrx, 8.960, 3.2.0-37-generic, i686: installed
fglrx, 8.960, 3.2.0-37-generic-pae, i686: installed
fglrx, 8.960, 3.2.0-38-generic, i686: installed
fglrx, 8.960, 3.2.0-38-generic-pae, i686: installed
fglrx, 8.960, 3.2.0-39-generic, i686: installed
fglrx, 8.960, 3.2.0-39-generic-pae, i686: installed
fglrx, 8.960, 3.2.0-40-generic, i686: installed
fglrx, 8.960, 3.2.0-40-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-24-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-24-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-26-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-26-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-27-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-27-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-29-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-29-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-31-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-31-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-32-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-32-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-33-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-33-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-34-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-34-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-35-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-35-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-36-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-36-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-37-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-37-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-38-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-38-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-39-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-39-generic-pae, i686: installed
vboxhost, 4.1.8, 3.2.0-40-generic, i686: installed
vboxhost, 4.1.8, 3.2.0-40-generic-pae, i686: installed
有关 DKMS 的更多信息位于此处手册页。
答案2
迂腐,dkms status
确实不是显示哪些包包含输出中提到的模块,如果包裹在该上下文中指的是包管理。
验证这一点的最简单方法是检查哪个包包含相应的/usr/src/<modulename>-<moduleversion>/dkms.conf
文件(对于普通模块)或相应的/var/lib/dkms-binary/<modulename>-<moduleversion>/*dkms.conf
文件(对于仅二进制 dkms 模块 - 尽管我不确定 *buntu 或其他基于 Debian 的发行版将二进制文件放在哪里- 默认情况下仅 dkms 模块,因此您可能需要验证发行版上的该路径)。
为了完整起见,对于具有mlocate/slocate
此功能的基于 rpm 的发行版,可以通过例如轻松查询,rpm -qf $(locate dkms.conf)
因为这是获取所有 dkms.conf 文件位置的最简单方法,而无需知道它们可能位于该特定发行版的位置。
对于 *buntu 或其他基于 Debian 的发行版,它应该以相同的方式工作,
例如应该达到相同的结果,并向您显示安装了输出dpkg --search $(locate dkms.conf)
中列出的 dkms 模块的软件包。dkms status