经典问题:Linux 上安装 Python3的时候,无法配套openSSL,怎么办?

我有一台云主机是CentOS的,然后打算安装Python3+pip3,pip3用来下载一些包,其中涉及一些https的包需要Python3拥有SSL功能。我现在的处境是Python3没有SSL功能。

我在/usr/local 目录安装了openSSL,且用命令行可以输出openSSL的版本信心1.1.1

我安装python3.8,首先按照网上的说法修改安装包里的modules/setup这个文件的四行,定位SSL=/usr/local/openssl(按道理它就能抓到我安装的openssl啊!)。
然后./configure,
在make。
make的时候报错:一堆的undefined reference。
比如下面这句报错

libpython3.8.a(_ssl.o): In function `PyInit(short, short, long)':
/root/Python-3.8.1/./Modules/_ssl.c:6382: undefined reference to `OpenSSL_version_num'

问题是,为什么呢?
我不是已经安装了openssl,为什么python却抓不到这个openssl呢?

我也试过在./configure --with-openssl=/usr/local/openssl 也不行。

实在没办法了。

另外,我使用2.7版系统自带的Python可以 Import ssl。

直接用命令安装python3和pip3
sudo yum install python3
sudo yum install python3-pip

使用命令分别是python3和pip3