Article ID: 000057836 Content Type: Error Messages Last Reviewed: 07/13/2021

Error: "failed to load enclave" when Running Intel® Software Guard Extensions (Intel® SGX) Application

Environment

linux

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Troubleshooting steps to resolve errors when loading an enclave when Running Intel® Software Guard Extensions (Intel® SGX)

Description
  • Intel® Software Guard Extensions (Intel® SGX) is enabled in BIOS.
  • The latest Intel SGX Platform Software (PSW) is installed.
  • When running Intel SGX Sample Code, or a custom SGX application, in hardware-debug mode, encountered error: failed to load enclave.
Resolution
  1. Check if the Intel SGX driver is installed:

    $ sudo /sbin/depmod
    $ sudo /sbin/modprobe isgx

    If you get an error, the Intel SGX driver was not correctly installed.

  2. Install the Intel SGX driver:
    1. Download the desired SGX driver from the latest Intel SGX Linux Driver Repository (As an example, driver_2.6.0_b0a445.bin is the regular SGX driver; driver_1.36.bin is the DCAP driver).
    2. Execute the bin file: sudo ./sgx_linux_x64_driver_2.6.0_b0a445b.bin.
    3. You should see a Installation is successful! message.
    4. Confirm that the driver was installed: ls /dev | grep sgx.
  3. Start the aesmd service:

    $ ps aux | grep -i aesm

    $ sudo systemctl start aesmd

    $ cat /var/log/syslog | grep -i aesm