小编Wip*_*Wip的帖子

安装Python 3.8.1 --with-openssl --without-root/apt/yum

我需要在不同的用户目录中安装带有 ssl 的 Python3。我正在 Debian 上工作,没有 root 权限。我真的很想自己找到解决方案,但花了几个小时后我仍然无法正确完成它。

安装ssl和python的路径是$HOME/.local/

$HOME 始终是绝对路径,例如 /path/to/install

下面的日志

我已经尝试过的事情:

1.创建安装文件夹

cd $HOME
mkdir .local
cd .local
mkdir ssl
mkdir python
mkdir src
cd src
Run Code Online (Sandbox Code Playgroud)

2.下载最新的Python和openssl tar版本

wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
tar xvfz Python-3.8.1.tgz
tar xvfz openssl-1.1.1d.tar.gz
Run Code Online (Sandbox Code Playgroud)

3.配置、制作、安装Openssl(在$HOME/.local/ssl中)

cd openssl-1.1.1d
./config --prefix=$HOME/.local/ssl
make && make install
Run Code Online (Sandbox Code Playgroud)

4. 编辑模块/设置、制作、安装Python

cd $HOME/.local/src/Python-3.8.1
cd Modules
vi Setup
Run Code Online (Sandbox Code Playgroud)

模块/设置

210 SSL=$HOME/.local/ssl
211 _ssl _ssl.c \
212         -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
213         -L$(SSL)/lib -lssl -lcrypto
Run Code Online (Sandbox Code Playgroud)

配置

cd $HOME/.local/src/Python-3.8.1
./configure --prefix=$Home/.local/python
Run Code Online (Sandbox Code Playgroud)

日志片段 …

python debian openssl makefile python-3.x

7
推荐指数
1
解决办法
4883
查看次数

标签 统计

debian ×1

makefile ×1

openssl ×1

python ×1

python-3.x ×1