标签:direct rpm 腾讯 director echo prefix openssl安装 情况 init
python 导入clickhouse_driver需要import ssl和_ssl,报错
File "/home/oracle/python3/lib/python3.7/site-packages/clickhouse_driver-0.1.2-py3.7-linux-x86_64.egg/clickhouse_driver/__init__.py", line 2, in <module> from .client import Client File "/home/oracle/python3/lib/python3.7/site-packages/clickhouse_driver-0.1.2-py3.7-linux-x86_64.egg/clickhouse_driver/client.py", line 1, in <module> import ssl File "/home/oracle/python3/lib/python3.7/ssl.py", line 98, in <module> import _ssl # if we can‘t import it, let the error propagate ImportError: libssl.so.1.1: cannot open shared object file: No such file or director
查看openssl安装情况
[root@localhost ~]# rpm -aq|grep openssl openssl-1.0.1e-58.el6_10.x86_64 openssl-devel-1.0.1e-58.el6_10.x86_64
版本是1.0.1e,不符合需求
从 openssl官网下载最新的代码包,因为源站下载速度过慢,所以我使用了腾讯云的镜像
#从官网下载 # wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz #腾讯云提供的镜像 wget https://mirrors.cloud.tencent.com/openssl/source/openssl-1.1.1g.tar.gz
tar -xvf openssl-1.1.1g.tar.gz cd openssl-1.1.1g ./config shared --openssldir=/usr/local/openssl --prefix=/usr/local/openssl make && make install
echo "/usr/local/openssl/lib/" >> /etc/ld.so.conf ldconfig
[oracle@localhost ~]$ python3 Python 3.7.2rc1 (default, Nov 1 2019, 08:59:21) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ssl >>>
成功!
标签:direct rpm 腾讯 director echo prefix openssl安装 情况 init
原文地址:https://www.cnblogs.com/ycy1518/p/13087193.html