ubuntu 英特尔SGX无法找到sgxsdk/环境

piztneat  于 2023-02-21  发布在  其他
关注(0)|答案(1)|浏览(231)

我正在Ubuntu 20.04上使用英特尔SGX,并尝试运行一些SampleApps。但是,我收到如下错误:./app: error while loading shared libraries: libsgx_urts.so.2: cannot open shared object file: No such file or directory
我在网上查了一下,有人说我需要做source /opt/intel/sgxsdk/environment,但是sgxsdk里没有/environment。-bash: /opt/intel/sgxsdk/environment: No such file or directory

nimxete2

nimxete21#

您必须验证是否已安装英特尔SGX sdk。可以从github repo安装,也可以直接从the intel repo下载二进制文件。
如果你使用的是github repo,你应该遵循构建过程,然后安装sdk,例如在ubuntu20.04上的步骤如下:

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

相关问题