其他服务器的pyinstall编译器脚本无法运行它

时间:2015-09-15 08:38:36

标签: python python-2.7 pyinstaller

我有一个python脚本,我使用pyinstall创建一个文件

但是当我将此文件用于其他服务器时,有一些问题

[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 lib,我使用python shell看hashlib模块,这是正确的。

1 个答案:

答案 0 :(得分:0)

它是开放式的,所以下载ssl CERTIFICATE参见

http://drops.cnmoker.org/archives/403.html

老版本的openssl会有一个坑,由于证书太老,导致openssl CURL python pip都错误

解决办法,下载一个新的CA证书,替换掉老的/etc/pki/tls/certs/ca-bundle.crt

https://labs.bitpay.com/t/how-to-update-the-root-ca-cert-bundle-on-your-webserver-if-you-are-getting-curl-ssl-errors/315

并且可能会关注GLIBC版本