如何链接到libssl.so.1.1"/python:错误libssl.so.1.1:无法打开共享对象文件:没有这样的文件或目录";

如何链接到libssl.so.1.1"/python:错误libssl.so.1.1:无法打开共享对象文件:没有这样的文件或目录";,python,html,apache,Python,Html,Apache,我正在一个没有根访问权限的共享服务器上工作。我花了数小时让openssl和libffi在服务器上使用python。我想了一次,但后来它坏了,因为我移动了目录,所以我决定重新开始。以下是我为自己编写的文档,用于设置: // Pthon3.8.2 setup on bluehost -currently libffi is still broken mkdir install-workspaces cd install-workspaces mkdir openssl cd openssl wg

我正在一个没有根访问权限的共享服务器上工作。我花了数小时让openssl和libffi在服务器上使用python。我想了一次,但后来它坏了,因为我移动了目录,所以我决定重新开始。以下是我为自己编写的文档,用于设置:

// Pthon3.8.2 setup on bluehost -currently libffi is still broken

mkdir install-workspaces
cd install-workspaces
mkdir openssl
cd openssl

wget https://ftp.openssl.org/source/old/1.1.1/openssl-1.1.1.tar.gz
tar xvf openssl-1.1.1.tar.gz
cd openssl-1.1.1

//in order to run  wsgi we might need to say "shared" instead of "no-shared"
./config --prefix=/home/user/local/lib/openssl --openssldir=/home/user/local/lib/openssl no-shared zlib-dynamic
make
make test
make install


cd ../../
mkdir libffi
cd libffi

wget ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz
tar xzf libffi-3.2.1.tar.gz
cd libffi-3.2.1

//I dont know if --disable-docs does anything, but I used the command and the install worked
./configure --prefix=/home/user/local/lib/libffi/ --disable-docs
make
make install


cd ../../
mkdir python
cd python

wget http://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz
tar -xvf Python-3.8.2.tar.xz
cd Python-3.8.2

vim Modules/Setup

//press [i]
/* //remove the comments on the lines below and change the SSL= to be your openssl directory
SSL=/home/user/local/lib/openssl
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto
*/
//press [esc] type ":wq" and press enter

export LD_LIBRARY_PATH=/home/user/local/lib/openssl/lib
PKG_CONFIG_PATH=/home/user/local/lib/libffi/lib/pkgconfig

./configure --with-openssl=/home/user/local/lib/openssl --prefix="/home/user/local/lib/python" --enable-optimizations LDFLAGS='-L/home/user/local/lib/libffi/lib64 -R/home/user/local/lib/libffi/lib64' --enable-shared
make
make altinstall //<- important for _ctypes
//bluehost上的Pthon3.8.2安装程序-当前libffi仍处于中断状态
mkdir安装工作区
cd安装工作区
mkdir-openssl
cd openssl
wgethttps://ftp.openssl.org/source/old/1.1.1/openssl-1.1.1.tar.gz
tar xvf openssl-1.1.1.tar.gz
cd openssl-1.1.1
//为了运行wsgi,我们可能需要说“共享”而不是“无共享”
./config--prefix=/home/user/local/lib/openssl--openssldir=/home/user/local/lib/openssl无共享zlib动态
制作
测验
安装
cd..//
mkdir LIFFI
光盘库
wgetftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz
tar xzf libffi-3.2.1.tar.gz
cd-libffi-3.2.1
//我不知道--disable docs是否有任何作用,但我使用了这个命令,安装成功了
./configure--prefix=/home/user/local/lib/libffi/--禁用文档
制作
安装
cd..//
mkdir python
cd python
wgethttp://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz
tar-xvf Python-3.8.2.tar.xz
cd Python-3.8.2
vim模块/设置
//新闻界[i]
/*//删除下面几行上的注释,并将SSL=更改为您的openssl目录
SSL=/home/user/local/lib/openssl
_ssl\u ssl.c\
-DUSE_SSL-I$(SSL)/include-I(SSL)/include/openssl\
-L$(SSL)/lib-lssl-lcrypto
*/
//按[esc]键入:wq“并按enter键
导出LD_LIBRARY_PATH=/home/user/local/lib/openssl/lib
PKG_CONFIG_PATH=/home/user/local/lib/libffi/lib/pkgconfig
./configure--with openssl=/home/user/local/lib/openssl--prefix=“/home/user/local/lib/python”--启用优化LDFLAGS='-L/home/user/local/libffi/lib64-R/home/user/local/lib/libffi/lib64'-启用共享
制作
安装高度表//