VirtualBox安装问题--错误码0x80004002

本文针对VirtualBox在安装过程中出现的错误码0x80004002问题提供了详细的解决方案,通过修改注册表中特定键值来修复,使用户能够顺利运行Genymotion模拟器。

之前一直都是用真机测试,然而想跑下模拟器,上genymotion官网安装遇到问题。

VirtualBox安装问题--错误码0x80004002 解决方案 修改注册表

1.Win+R     输入regedit打开注册表   

找到 HKEY_CLASSES_ROOT\CLSID\{00020420-0000-0000-C000-000000000046}\InprocServer32   把默认值修改为C:\Windows\System32\oleaut32.dll

 

找到 HKEY_CLASSES_ROOT\CLSID\{00020424-0000-0000-C000-000000000046}\InprocServer32   把默认值修改为C:\Windows\System32\oleaut32.dll

 

然后重新打开VirtualBox

[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
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值