You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu20.04虚拟机安装SGX DCAP驱动make编译失败求助

SGX DCAP安装错误原因分析

问题背景

在Ubuntu 20.04虚拟机上安装SGX DCAP时,执行sudo ./sgx_linux_x64_driver_1.36.2.bin触发DKMS编译错误,具体报错信息如下:

Unpacking Intel SGX Driver ... done.
Verifying the integrity of the install package ... done.
Installing Intel SGX Driver ...
/tmp/sgx-driver-TPgGiQ /home/sama
install -d /opt/intel/sgxdriver/package
install -d /opt/intel/sgxdriver/scripts
cp -r package/* /opt/intel/sgxdriver/package
install scripts/* /opt/intel/sgxdriver/scripts
/home/sama

Creating symlink /var/lib/dkms/sgx/1.36.2/source ->
                 /usr/src/sgx-1.36.2

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' KDIR=/lib/modules/5.15.0-1023-azure/build....(bad exit status: 2)
ERROR (dkms apport): binary package for sgx: 1.36.2 not found
Error! Bad return status for module build on kernel: 5.15.0-1023-azure (x86_64)
Consult /var/lib/dkms/sgx/1.36.2/build/make.log for more information.

相关系统信息:

  • 执行dpkg-query -s linux-headers-$(uname -r)显示已安装的内核头文件版本为5.15.0-1029-azure
  • 执行ls -la /dev/sgx*显示系统中已存在SGX设备节点

错误原因

1. 内核版本与头文件版本不匹配

报错中DKMS尝试为5.15.0-1023-azure内核编译驱动,但当前系统安装的内核头文件是5.15.0-1029-azure,二者版本不一致。DKMS编译内核模块必须依赖与当前运行内核完全匹配的头文件,版本差异会直接导致编译失败。

2. 系统已预装SGX驱动

从/dev/sgx_enclave和/dev/sgx_provision设备存在的情况来看,Azure内核已经自带了in-tree版本的SGX驱动。此时再安装Intel提供的out-of-tree驱动会产生冲突,触发DKMS编译错误。


内容的提问来源于stack exchange,提问作者sama

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 14:35:35