---
title: 虚拟机安装驱动包出现报错“Drv_dkms_env_check failed”-昇腾社区
description: 虚拟机安装驱动包时出现报错“Drv_dkms_env_check failed”，安装驱动包失败。
keywords: 虚拟机;安装驱动包
url: https://www.hiascend.com/document/caselibrary/detail/topic_0000002239224858
section: (其他)
---

# 虚拟机安装驱动包出现报错“Drv_dkms_env_check failed”-昇腾社区

URL: https://www.hiascend.com/document/caselibrary/detail/topic_0000002239224858
描述: 虚拟机安装驱动包时出现报错“Drv_dkms_env_check failed”，安装驱动包失败。
关键词: 虚拟机;安装驱动包

昇腾文档 [了解详情](https://www.hiascend.com/document)

故障案例 [了解详情](https://www.hiascend.com/document/caselibrary)

虚拟机安装驱动包出现报错“Drv_dkms_env_check failed”

虚拟机安装驱动包出现报错“Drv_dkms_env_check failed”

2025/04/11

1.2k

问题信息

| 问题来源 | 产品大类 | 产品子类 | 关键字 |
| --- | --- | --- | ---|
| 内部测试 | 部署虚拟机 | 虚拟机 | 虚拟机、安装驱动包 |

#### 问题现象描述

虚拟机安装驱动包时出现报错“Drv_dkms_env_check failed”，安装驱动包失败。

```
Verifying archive integrity...  100%   SHA256 checksums are OK. All good.
Uncompressing ASCEND DRIVER RUN PACKAGE  100%
[Driver] [2023-02-28 16:13:38] [INFO]Start time: 2023-02-28 16:13:38
[Driver] [2023-02-28 16:13:38] [INFO]LogFile: /var/log/ascend_seclog/ascend_install.log
[Driver] [2023-02-28 16:13:38] [INFO]OperationLogFile: /var/log/ascend_seclog/operation.log
[Driver] [2023-02-28 16:13:38] [WARNING]Do not power off or restart the system during the installation/upgrade
[Driver] [2023-02-28 16:13:38] [INFO]set username and usergroup, HwHiAiUser:HwHiAiUser
[Driver] [2023-02-28 16:13:40] [INFO]driver install type: Rebuild
[Driver] [2023-02-28 16:13:40] [INFO]Rebuilding by kernel path(/lib/modules/4.18.0-193.el8.x86_64/build), detail in /var/log/ascend_seclog/ascend_rebuild.log
[Driver] [2023-02-28 16:13:43] [WARNING]Rebuild ko has something wrong, detail in /var/log/ascend_seclog/ascend_rebuild.log
[Driver] [2023-02-28 16:13:43] [INFO]Do you want to try build driver after input kernel absolute path? [y/n]:
y
[Driver] [2023-02-28 16:13:58] [INFO]Please input your kernel absolute path or input [Q/q] to exit:
q
[Driver] [2023-02-28 16:14:04] [ERROR]Drv_dkms_env_check failed, details in : /var/log/ascend_seclog/ascend_install.log
[Driver] [2023-02-28 16:14:04] [INFO]Failed to install driver package, please retry after uninstall and reboot!
```

#### 解决措施

执行如下命令，安装内核头文件。

yum install kernel-devel kernel-headers -y

本页内容

- 问题信息
- 问题现象描述
- 解决措施
