Centos7 ImportError: libssl.so.3: cannot open shared object file: No such file or directory

Centos7系统的云服务器,安装好Python3.11.9后,执行python3.11 -c "import _ssl"时,报错如下:

ImportError: libssl.so.3: cannot open shared object file: No such file or directory

ImportError: libcrypto.so.3: cannot open shared object file: No such file or directory

这样解决的:

情况1. find / -name libssl.so.3全局查找该文件,能找到的话,直接把它cp到/lib64/里就行了

情况2. find / -name libssl.so.3找不到文件,由于是内网环境,openssl也无法升级到3.0以上版本,最后是去别的服务器拷贝libssl.so.3和libcrypto.so.3这两个文件,然后丢到/lib64/目录里,问题才解决(注:如果手头上没有其他服务器,可以用anaconda和pyenv应该也能解决问题)

你可能感兴趣的:(服务器)