# Python v3.10 + Openssl v1.11 + Sqlite3 v3.39 Installation # Openssl v1.11 installation path: /opt/openssl # Sqlite3 v3.39 installation path: /usr # Python v3.10 installation path: /opt/python3.10 # Installation Prerequisites yum -y install gcc gcc-devel gcc-c++ readline-devel # Openssl v1.11 Installation wget --no-check-certificate https://www.openssl.org/source/openssl-1.1.1q.tar.gz -O /tmp/openssl.tgz && tar xzvf /tmp/openssl.tgz -C /tmp && cd openssl-1.1.1q/ ./config --prefix=/opt/openssl --openssldir=/opt/openssl -D_REENTRANT && make && make install # Sqlite3 v3.39 Installation wget --no-check-certificate https://www.sqlite.org/2022/sqlite-autoconf-3390200.tar.gz -O /tmp/sqlite3.tgz && tar xzvf /tmp/sqlite3.tgz -C /tmp && cd sqlite-autoconf-3390200 && ./configure --prefix=/usr && make && make install # Python v3.10 Installation wget https://www.python.org/ftp/python/3.10.6/Python-3.10.6.tgz -O /tmp/python3.tgz && tar xzvf /tmp/python3.tgz -C /tmp && cd /tmp/Python-3.10.6 && [OPTIONAL Sqlite3 Installation: /opt/sqlite3] # Add 'non-default' Sqlite3 path to library environment export LD_LIBRARY_PATH=/opt/openssl/lib:/opt/sqlite3/lib:/usr/lib:/usr/lib64 export LD_RUN_PATH=/opt/openssl/lib:/opt/sqlite3/lib:/usr/lib:/usr/lib64/ # Edit: /tmp/Python-3.10.6 and add the path to sqlite3/include to the list sqlite_inc_paths = [ '/opt/sqlite3/include', ] # Include Sqlite3 library and header path in the build (./configure) CFLAGS, LDFLAGS # Notice: Space separate multiple flags: CFLAGS="-I/opt/openssl/include/openssl -I/opt/sqlite3/include" CFLAGS="-I/opt/sqlite3/include" LDFLAGS="-L/opt/sqlite3/lib" [/OPTIONAL] export LD_LIBRARY_PATH=/opt/openssl/lib:/usr/lib:/usr/lib64/ export LD_RUN_PATH=/opt/openssl/lib:/usr/lib:/usr/lib64/ [WORKING] ./configure --prefix=/opt/python3.10 --with-ensurepip=yes --with-openssl=/opt/openssl CFLAGS="-I/opt/openssl/include/openssl" LDFLAGS="-L/opt/openssl/lib" CXX=/usr/bin/g++ [BETA] ./configure --prefix=/opt/python3.10 --with-ensurepip=yes --with-openssl=/opt/openssl --with-openssl-rpath=/opt/openssl/lib \ --with-ssl-default-suites=openssl CFLAGS="-I/opt/openssl/include/" LDFLAGS="-L/opt/openssl/lib" CXX=/usr/bin/g++ \ --enable-optimizations --enable-loadable-sqlite-extensions make && make install