@@ -102,7 +102,8 @@ Build the Intel(R) SGX SDK and Intel(R) SGX PSW Package
102102- Use the following command(s) to install the required tools to build the Intel(R) SGX SDK:
103103 * On Ubuntu 18.04 and Debian 10:
104104 ```
105- $ sudo apt-get install build-essential ocaml ocamlbuild automake autoconf libtool wget python libssl-dev git cmake perl
105+ $ sudo apt-get install build-essential ocaml ocamlbuild automake autoconf libtool wget python3 libssl-dev git cmake perl
106+ $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
106107 ```
107108 * On Ubuntu 20.04 and Ubuntu 22.04:
108109 ```
@@ -111,25 +112,26 @@ Build the Intel(R) SGX SDK and Intel(R) SGX PSW Package
111112 * On Red Hat Enterprise Linux 8.6:
112113 ```
113114 $ sudo yum groupinstall 'Development Tools'
114- $ sudo yum install ocaml ocaml-ocamlbuild wget python2 openssl-devel git cmake perl
115- $ sudo alternatives --set python /usr/bin/python2
115+ $ sudo yum install ocaml ocaml-ocamlbuild wget python3 openssl-devel git cmake perl
116+ $ sudo alternatives --set python /usr/bin/python3
116117 ```
117118 * On CentOS Stream 8 and CentOS 8.3:
118119 ```
119120 $ sudo dnf group install 'Development Tools'
120- $ sudo dnf --enablerepo=powertools install ocaml ocaml-ocamlbuild redhat-rpm-config openssl-devel wget rpm-build git cmake perl python2
121- $ sudo alternatives --set python /usr/bin/python2
121+ $ sudo dnf --enablerepo=powertools install ocaml ocaml-ocamlbuild redhat-rpm-config openssl-devel wget rpm-build git cmake perl python3
122+ $ sudo alternatives --set python /usr/bin/python3
122123 ```
123124 * On Anolis 8.6:
124125 ```
125126 $ sudo dnf group install 'Development Tools'
126- $ sudo dnf --enablerepo=PowerTools install ocaml ocaml-ocamlbuild redhat-rpm-config openssl-devel wget rpm-build git cmake perl python2
127- $ sudo alternatives --set python /usr/bin/python2
127+ $ sudo dnf --enablerepo=PowerTools install ocaml ocaml-ocamlbuild redhat-rpm-config openssl-devel wget rpm-build git cmake perl python3
128+ $ sudo alternatives --set python /usr/bin/python3
128129 ```
129130 * On SUSE Linux Enterprise Server 15.4:
130131 ```
131132 $ sudo zypper install --type pattern devel_basis
132- $ sudo zypper install ocaml ocaml-ocamlbuild automake autoconf libtool wget python libopenssl-devel rpm-build git cmake perl
133+ $ sudo zypper install ocaml ocaml-ocamlbuild automake autoconf libtool wget python3 libopenssl-devel rpm-build git cmake perl
134+ $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
133135 ```
134136 ** Note** : To build Intel(R) SGX SDK, gcc version is required to be 7.3 or above and glibc version is required to be 2.27 or above.
135137- Use the following command to install additional required tools and latest Intel(R) SGX SDK Installer to build the Intel(R) SGX PSW:
@@ -140,19 +142,19 @@ Build the Intel(R) SGX SDK and Intel(R) SGX PSW Package
140142 ```
141143 * On Ubuntu 20.04 and Ubuntu 22.04:
142144 ```
143- $ 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
145+ $ 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 lsb-release libsystemd0
144146 ```
145147 * On Red Hat Enterprise Linux 8.6:
146148 ```
147- $ sudo yum install openssl-devel libcurl-devel protobuf-devel cmake rpm-build createrepo yum-utils pkgconf boost-devel protobuf-lite-devel protobuf-c-compiler protobuf-c-devel systemd-libs
149+ $ sudo yum install openssl-devel libcurl-devel protobuf-devel cmake rpm-build createrepo yum-utils pkgconf boost-devel protobuf-lite-devel systemd-libs
148150 ```
149151 * On CentOS Stream 8 and CentOS 8.3:
150152 ```
151- $ sudo dnf --enablerepo=powertools install openssl-devel libcurl-devel protobuf-devel cmake rpm-build createrepo yum-utils pkgconf boost-devel protobuf-lite-devel protobuf-c-compiler protobuf-c-devel systemd-libs
153+ $ sudo dnf --enablerepo=powertools install openssl-devel libcurl-devel protobuf-devel cmake rpm-build createrepo yum-utils pkgconf boost-devel protobuf-lite-devel systemd-libs
152154 ```
153155 * On Anolis 8.6:
154156 ```
155- $ sudo dnf --enablerepo=PowerTools install openssl-devel libcurl-devel protobuf-devel cmake rpm-build createrepo yum-utils pkgconf boost-devel protobuf-lite-devel protobuf-c-compiler protobuf-c-devel systemd-libs
157+ $ sudo dnf --enablerepo=PowerTools install openssl-devel libcurl-devel protobuf-devel cmake rpm-build createrepo yum-utils pkgconf boost-devel protobuf-lite-devel systemd-libs
156158 ```
157159 * On SUSE Linux Enterprise Server 15.4:
158160 ```
@@ -343,24 +345,26 @@ Install the Intel(R) SGX SDK
343345 * Anolis OS 8.6 64bits
344346 * Debian 10 64bits
345347- Use the following command to install the required tool to use Intel(R) SGX SDK:
346- * On Ubuntu 18.04, Ubuntu 20.04 and Debian 10:
348+ * On Ubuntu 18.04 and Debian 10:
347349 ```
348- $ sudo apt-get install build-essential python
350+ $ sudo apt-get install build-essential python3
351+ $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
349352 ```
350- * On Ubuntu 22.04:
353+ * On Ubuntu 20.04 and Ubuntu 22.04:
351354 ```
352- $ sudo apt-get install build-essential python2
355+ $ sudo apt-get install build-essential python-is-python3
353356 ```
354357 * On Red Hat Enterprise Linux 8.6, CentOS Stream 8, CentOS 8.3 and Anolis OS 8.6:
355358 ```
356359 $ sudo yum groupinstall 'Development Tools'
357- $ sudo yum install python2
358- $ sudo alternatives --set python /usr/bin/python2
360+ $ sudo yum install python3
361+ $ sudo alternatives --set python /usr/bin/python3
359362 ```
360363 * On SUSE Linux Enterprise Server 15.4:
361364 ```
362365 $ sudo zypper install --type pattern devel_basis
363- $ sudo zypper install python
366+ $ sudo zypper install python3
367+ $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
364368 ```
365369
366370### Install the Intel(R) SGX SDK
@@ -403,6 +407,13 @@ See the later topic, *Install Intel(R) SGX PSW*, for information on how to insta
403407 $ ./app
404408```
405409 Use similar commands for other code samples.
410+ **Note:** On Ubuntu 22.04 or any distro with systemd v248 or later, /dev/sgx_enclave is only accessible by users in the group "sgx". The enclave app should be run with a uid in the sgx group.
411+ ```
412+ # check systemd version:
413+ $ systemctl --version
414+ # add sgx group to user if it's 248 or above:
415+ $ sudo usermod -a -G sgx <user name >
416+ ```
406417
407418
408419Install the Intel(R) SGX PSW
0 commit comments