Install dkms first.
$ sudo apt install dkms
- on ubuntu 18.04
$ wget https://download.01.org/intel-sgx/sgx-linux/2.17/distro/ubuntu18.04-server/sgx_linux_x64_driver_1.41.bin
$ chmod +x sgx_linux_x64_driver_1.41.bin
$ ./sgx_linux_x64_driver_1.41.bin
- on ubuntu 20.04
$ wget https://download.01.org/intel-sgx/sgx-linux/2.17/distro/ubuntu20.04-server/sgx_linux_x64_driver_1.41.bin
$ chmod +x sgx_linux_x64_driver_1.41.bin
$ ./sgx_linux_x64_driver_1.41.bin