1.前因
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 directory
查看openssl安装情况
[oracle@localhost bin]$ rpm -aq|grep openssl openssl-1.0.1e-48.el6.x86_64
发现没有安装openssl-devel
2.安装openssl-devel
root用户执行
yum install openssl-devel
出现glibc-common版本需求不一致导致安装失败
错误:Package: glibc-2.12-1.132.el6.i686 (rhel-source) Requires: glibc-common = 2.12-1.132.el6 已安装: glibc-common-2.12-1.192.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201604140956.x86_64/6.8) glibc-common = 2.12-1.192.el6 Available: glibc-common-2.12-1.132.el6.x86_64 (rhel-source) glibc-common = 2.12-1.132.el6 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
根据系统版本去阿里云镜像下载源
//下载镜像 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo //替换$releasever为6 sed -i ‘s/$releasever/6/g‘ /etc/yum.rep //清除yum缓存 yum clean all //建立本地缓存 yum makecache //查看yum源中是否有软件包 yum repolist 已加载插件:product-id, search-disabled-repos, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Repository contrib is listed more than once in the configuration 仓库标识 仓库名称 状态 base CentOS-6 - Base - mirrors.aliyun.com 6,713 extras CentOS-6 - Extras - mirrors.aliyun.com 47 rhel-source Red Hat Enterprise Linux 6Server - x86_64 - Source 3,690 updates CentOS-6 - Updates - mirrors.aliyun.com 1,020
此时安装openssl-devel
.... //省略
已安装: openssl-devel.x86_64 0:1.0.1e-58.el6_10 作为依赖被安装: keyutils-libs-devel.x86_64 0:1.4-5.el6 krb5-devel.x86_64 0:1.10.3-65.el6 libcom_err-devel.x86_64 0:1.41.12-24.el6 libkadm5.x86_64 0:1.10.3-65.el6 libselinux-devel.x86_64 0:2.0.94-7.el6 libsepol-devel.x86_64 0:2.0.41-4.el6 作为依赖被升级: e2fsprogs.x86_64 0:1.41.12-24.el6 e2fsprogs-libs.x86_64 0:1.41.12-24.el6 krb5-libs.x86_64 0:1.10.3-65.el6 krb5-workstation.x86_64 0:1.10.3-65.el6 libcom_err.x86_64 0:1.41.12-24.el6 libss.x86_64 0:1.41.12-24.el6 openssl.x86_64 0:1.0.1e-58.el6_10 完毕!
成功安装!
查看openssl安装情况
[root@localhost yum.repos.d]# rpm -aq|grep openssl openssl-1.0.1e-58.el6_10.x86_64 openssl-devel-1.0.1e-58.el6_10.x86_64
因glibc-common版本原因导致yum install Openssl-devel失败
原文:https://www.cnblogs.com/ycy1518/p/13086725.html