0

I'm working with Intel SGX on Ubuntu 20.04 and trying to run some SampleApps. However I get errors like: ./app: error while loading shared libraries: libsgx_urts.so.2: cannot open shared object file: No such file or directory

I checked on the internet and people say I need to do source /opt/intel/sgxsdk/environment. But I don't have /environment in sgxsdk. -bash: /opt/intel/sgxsdk/environment: No such file or directory

Javid
  • 13
  • 3

1 Answers1

0

You must verify that you've installed the Intel SGX sdk. Either from the github repo or directly downloading the binary from the intel repo.

If you're using the github repo, you should follow the build process then the installation of the sdk. The steps are the following on ubuntu 20.04 for example:

sudo apt-get install build-essential ocaml ocamlbuild automake autoconf libtool wget python-is-python3 libssl-dev git cmake perl

sudo apt-get install libssl-dev libcurl4-openssl-dev protobuf-compiler libprotobuf-dev debhelper cmake reprepro unzip pkgconf libboost-dev libboost-system-dev libboost-thread-dev protobuf-c-compiler libprotobuf-c-dev lsb-release libsystemd0

git clone https://github.com/intel/linux-sgx.git
cd linux-sgx && make preparation

sudo cp external/toolset/{current_distr}/* /usr/local/bin
which ar as ld objcopy objdump ranlib

# build
make sdk

# install 
sudo apt-get install build-essential python
cd linux/installer/bin
./sgx_linux_x64_sdk_${version}.bin

# and finally source 
source ${sgx-sdk-install-path}/environment
Gemini15
  • 101
  • 1
  • 6