我有一个python脚本,我使用pyinstall来生成一个onefile
但是当我将该文件用于其他服务器时,会出现一些问题。
[root@ops-pdc-02 tmp]# ./linux_server_script
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/tmp/build/linux_server_script/out00-PYZ.pyz/hashlib", line 147, in <module>
File "/tmp/build/linux_server_script/out00-PYZ.pyz/hashlib", line 97, in __get_builtin_constructor
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
File "/tmp/build/linux_server_script/out00-PYZ.pyz/hashlib", line 147, in <module>
File "/tmp/build/linux_server_script/out00-PYZ.pyz/hashlib", line 97, in __get_builtin_constructor
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
File "/tmp/build/linux_server_script/out00-PYZ.pyz/hashlib", line 147, in <module>
File "/tmp/build/linux_server_script/out00-PYZ.pyz/hashlib", line 97, in __get_builtin_constructor
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
File "/tmp/build/linux_server_script/out00-PYZ.pyz/hashlib", line 147, in <module>
File "/tmp/build/linux_server_script/out00-PYZ.pyz/hashlib", line 97, in __get_builtin_constructor
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.我的服务器有openssl,我使用python看起来像hashlib模块,这是正确的。
发布于 2015-09-18 07:18:23
这是不好的openssl,所以请下载ssl证书
http://drops.cnmoker.org/archives/403.html
老版本的openssl会有一个坑,由于证书太老,导致openssl卷曲python pip都错误
解决办法,下载一个新的ca证书,替换掉老的/etc/pki/tls/certs/ca-bundle.crt
也许还需要注意GLIBC版本
https://stackoverflow.com/questions/32581458
复制相似问题