/etc/init.d/vboxdrv setup fails on kernel 2.6.32-24

本文介绍了一种安装VirtualBox驱动的方法,首先需要通过命令行安装dkms软件包,然后运行vboxdrv设置脚本以完成安装过程。

Instead: Install dkms and then run apt-get update, upgrade and then /etc/init.d/vboxdrv setup

 

首先安装dkms:sudo apt-get install dkms

再安装:sudo /etc/init.d/vboxdrv setup

[dragon@localhost ~]$ rpm -qa | grep qt5-qtbase # 查看当前版本 qt5-qtbase-postgresql-5.11.1-23.ky10.x86_64 qt5-qtbase-mysql-5.11.1-23.ky10.x86_64 qt5-qtbase-common-5.11.1-23.ky10.noarch qt5-qtbase-gui-5.11.1-23.ky10.x86_64 qt5-qtbase-5.11.1-23.ky10.x86_64 [dragon@localhost ~]$ strings /usr/lib64/libQt5Core.so.5 | grep "Qt_5\." # 检查符号版本 Qt_5.11.1_PRIVATE_API Qt_5.0 Qt_5.1 Qt_5.2 Qt_5.3 Qt_5.4 Qt_5.5 Qt_5.6 Qt_5.7 Qt_5.8 Qt_5.9 Qt_5.10 Qt_5.11 [dragon@localhost ~]$ sudo yum install -y https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/q/qt5-qtbase-5.15.3-1.el8.x86_64.rpm Last metadata expiration check: 0:18:08 ago on 2025年11月03日 星期一 19时03分31秒. [MIRROR] qt5-qtbase-5.15.3-1.el8.x86_64.rpm: Status code: 404 for https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/q/qt5-qtbase-5.15.3-1.el8.x86_64.rpm (IP: 198.18.2.16) [MIRROR] qt5-qtbase-5.15.3-1.el8.x86_64.rpm: Status code: 404 for https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/q/qt5-qtbase-5.15.3-1.el8.x86_64.rpm (IP: 198.18.2.16) [MIRROR] qt5-qtbase-5.15.3-1.el8.x86_64.rpm: Status code: 404 for https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/q/qt5-qtbase-5.15.3-1.el8.x86_64.rpm (IP: 198.18.2.16) [MIRROR] qt5-qtbase-5.15.3-1.el8.x86_64.rpm: Status code: 404 for https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/q/qt5-qtbase-5.15.3-1.el8.x86_64.rpm (IP: 198.18.2.16) [FAILED] qt5-qtbase-5.15.3-1.el8.x86_64.rpm: Status code: 404 for https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/q/qt5-qtbase-5.15.3-1.el8.x86_64.rpm (IP: 198.18.2.16) Status code: 404 for https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/q/qt5-qtbase-5.15.3-1.el8.x86_64.rpm (IP: 198.18.2.16) [dragon@localhost ~]$ sudo ldconfig [dragon@localhost ~]$ echo 'export PATH=$PATH:/usr/lib/virtualbox' | sudo tee -a /etc/profile export PATH=$PATH:/usr/lib/virtualbox [dragon@localhost ~]$ source /etc/profile [dragon@localhost ~]$ sudo /sbin/vboxconfig # 查看详细错误 vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong. There were problems setting up VirtualBox. To re-start the set-up process, run /sbin/vboxconfig as root. If your system is using EFI Secure Boot you may need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information. [dragon@localhost ~]$ dmesg | grep vboxdrv # 检查内核日志 dmesg: 读取内核缓冲区失败: 不允许的操作 [dragon@localhost ~]$ sudo yum install -y kernel-devel-$(uname -r) gcc make Last metadata expiration check: 0:19:01 ago on 2025年11月03日 星期一 19时03分31秒. Package kernel-devel-4.19.90-23.59.v2101.ky10.x86_64 is already installed. Package gcc-7.3.0-20190804.h30.p05.ky10.x86_64 is already installed. Package make-1:4.2.1-15.ky10.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete! [dragon@localhost ~]$ # 生成密钥 sudo mokutil --import MOK.der # 导入密钥(需设置密码) [dragon@localhost ~]$ sudo openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VirtualBox/" Generating a RSA private key ..............................+++++ ..........+++++ writing new private key to 'MOK.priv' ----- [dragon@localhost ~]$ sudo mokutil --import MOK.der # 导入密钥(需设置密码)input password: input password again: [dragon@localhost ~]$ sudo rpm -ivh VirtualBox-6.1-6.1.46_158378_el8-1.x86_64.rpm 警告:VirtualBox-6.1-6.1.46_158378_el8-1.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID 2980aecf: NOKEY 错误:依赖检测失败: libQt5Core.so.5(Qt_5.12)(64bit) 被 VirtualBox-6.1-6.1.46_158378_el8-1.x86_64 需要 libSDL-1.2.so.0()(64bit) 被 VirtualBox-6.1-6.1.46_158378_el8-1.x86_64 需要 libvpx.so.5()(64bit) 被 VirtualBox-6.1-6.1.46_158378_el8-1.x86_64 需要 [dragon@localhost ~]$ sudo VBoxManage extpack install Oracle_VM*.vbox-extpack --accept-license=56be48f923303c8cbabbgbbg WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (4.19.90-23.59.v2101.ky10.x86_64) or it failed to load. Please recompile the kernel module and install it by sudo /sbin/vboxconfig You will not be able to start VMs until this problem is fixed. VBoxManage: error: Failed to create the VirtualBox object! VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available) VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start. [dragon@localhost ~]$ sudo rpm -ivh VirtualBox-6.1-6.1.46_158378_el8-1.x86_64.rpm --nodeps 警告:VirtualBox-6.1-6.1.46_158378_el8-1.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID 2980aecf: NOKEY Verifying... ################################# [100%] 准备中... ################################# [100%] 软件包 VirtualBox-6.1-6.1.46_158378_el8-1.x86_64 已经安装 [dragon@localhost ~]$ sudo VBoxManage extpack install Oracle_VM*.vbox-extpack --accept-license=56be48f923303c8cbabbgbbg WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (4.19.90-23.59.v2101.ky10.x86_64) or it failed to load. Please recompile the kernel module and install it by sudo /sbin/vboxconfig You will not be able to start VMs until this problem is fixed. VBoxManage: error: Failed to create the VirtualBox object! VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available) VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start. [dragon@localhost ~]$ VBoxManage list extpacks | grep "Extension Packs" VBoxManage: error: Failed to create the VirtualBox object! VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available) VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start.
最新发布
11-04
[dragon@localhost ~]$ sudo yum install -y https://download.virtualbox.org/virtualbox/6.1.46/VirtualBox-6.1-6.1.46_158378_el8-1.x86_64.rpm Last metadata expiration check: 0:03:08 ago on 2025年11月03日 星期一 19时03分31秒. VirtualBox-6.1-6.1.46_158378_el8-1.x86_64.rp 10 MB/s | 94 MB 00:09 Error: Problem: conflicting requests - nothing provides libQt5Core.so.5(Qt_5.12)(64bit) needed by VirtualBox-6.1-6.1.46_158378_el8-1.x86_64 (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages) [dragon@localhost ~]$ sudo yum install -y qt5-qtbase qt5-qtx11extras libstdc++.x86_64 Last metadata expiration check: 0:03:31 ago on 2025年11月03日 星期一 19时03分31秒. Package qt5-qtbase-5.11.1-23.ky10.x86_64 is already installed. Package qt5-qtx11extras-5.11.1-5.ky10.x86_64 is already installed. Package libstdc++-8.3.1-4.5.ky10.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete! [dragon@localhost ~]$ wget https://download.virtualbox.org/virtualbox/6.1.46/Oracle_VM_VirtualBox_Extension_Pack-6.1.46.vbox-extpack Will not apply HSTS. The HSTS database must be a regular and non-world-writable file. ERROR: could not open HSTS store at '/home/dragon/.wget-hsts'. HSTS will be disabled. --2025-11-03 19:07:16-- https://download.virtualbox.org/virtualbox/6.1.46/Oracle_VM_VirtualBox_Extension_Pack-6.1.46.vbox-extpack 正在解析主机 download.virtualbox.org (download.virtualbox.org)... 198.18.2.15 正在连接 download.virtualbox.org (download.virtualbox.org)|198.18.2.15|:443... 已连接。 已发出 HTTP 请求,正在等待回应... 200 OK 长度:11175297 (11M) [application/octet-stream] 正在保存至: “Oracle_VM_VirtualBox_Extension_Pack-6.1.46.vbox-extpack” Oracle_VM_VirtualBo 100%[================>] 10.66M 10.1MB/s 用时 1.1s 2025-11-03 19:07:17 (10.1 MB/s) - 已保存 “Oracle_VM_VirtualBox_Extension_Pack-6.1.46.vbox-extpack” [11175297/11175297]) [dragon@localhost ~]$ sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.1.46.vbox-extpack sudo: VBoxManage:找不到命令 [dragon@localhost ~]$ sudo yum install VBoxManage Last metadata expiration check: 0:04:22 ago on 2025年11月03日 星期一 19时03分31秒. No match for argument: VBoxManage Error: Unable to find a match: VBoxManage [dragon@localhost ~]$
11-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值