解决方法
省流:uname -r
查看当前内核,找到/usr/src/
目录下的多余的内核文件,删除残留多余的内核文件
原因可能是当时安装nvidia显卡驱动的时候没删除掉旧的内核文件,某些模块或驱动程序可能与特定内核版本相关联,如果使用了不匹配的内核文件,可能会导致模块加载失败或功能异常。留下来的会影响软件程序的安装和编译。
报错截图
报错如下:
server@server-Super-Server:~/Downloads$ sudo apt-get install ./rustdesk-1.1.9.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'rustdesk' instead of './rustdesk-1.1.9.deb'
rustdesk is already the newest version (1.1.9).
The following packages were automatically installed and are no longer required:
libjavascriptcoregtk-3.0-0 libwebkitgtk-3.0-0
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 365 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-headers-4.15.0-176-generic (4.15.0-176.185) ...
/etc/kernel/header_postinst.d/dkms:
* dkms: running auto installation service for kernel 4.15.0-176-generic
Error! Could not locate dkms.conf file.
File: does not exist.
...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 4
dpkg: error processing package linux-headers-4.15.0-176-generic (--configure):
installed linux-headers-4.15.0-176-generic package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-headers-generic:
linux-headers-generic depends on linux-headers-4.15.0-176-generic; however:
Package linux-headers-4.15.0-176-generic is not configured yet.
dpkg: error processing package linux-headers-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
linux-headers-4.15.0-176-generic
linux-headers-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
报错指出是未定位到 DKMS(Dynamic Kernel Module Support) 模块引起的,但是关键问题不是这里。
在 Linux 系统中,linux-headers-4.15.0-176-generic 是内核头文件的软件包,它通常用于开发和构建内核模块。这些头文件包含了内核接口的定义和其他必要的文件,以便与特定内核版本进行编译和链接。
uname -r 是一个用于在 Linux 系统中获取内核版本的命令,当年的内核版本是5.4.0-81-generic,4.15.0-176-generic是属于当时残留的内核文件
查看当前系统内核:
server@server-Super-Server:~/Downloads$ uname -r
5.4.0-81-generic
uname 是 "Unix Name" 的缩写,用于获取操作系统的信息。而 -r 选项表示获取内核的版本信息。
使用 uname -r 命令可以输出当前系统正在运行的内核版本号。
该版本号通常由一系列数字和字符组成,用于标识内核的具体版本和修订级别。了解内核版本对于了解系统的兼容性、功能支持以及安全更新等方面非常重要。
解决方法
1. 删除掉残留的内核文件即可
多余的内核文件可以在/usr/src/
路径下进行查找
2. 再次安装,成功!!!
Rustdesk远程软件界面展示: