루트 액세스 권한이없는 Linux 컴퓨터에 있습니다. 나는 openssl 및 python (2.7.13)의 자체 로컬 복사본을 만들었습니다. 내가 파이썬에서 hashlib을 가져올 때, 나는 이러한 오류 메시지를 얻을 :오류 : 루트 : 해시 md5 코드가 없습니다.
> python
Python 2.7.13 (default, Jan 22 2017, 19:23:53)
[GCC Intel(R) C++ gcc 4.8 mode] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/home/user_jp/srcMisc/Python-2.7.13/INSTALL/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/home/user_jp/srcMisc/Python-2.7.13/INSTALL/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
File "/home/user_jp/srcMisc/Python-2.7.13/INSTALL/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/home/user_jp/srcMisc/Python-2.7.13/INSTALL/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
File "/home/user_jp/srcMisc/Python-2.7.13/INSTALL/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/home/user_jp/srcMisc/Python-2.7.13/INSTALL/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
File "/home/user_jp/srcMisc/Python-2.7.13/INSTALL/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/home/user_jp/srcMisc/Python-2.7.13/INSTALL/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
File "/home/user_jp/srcMisc/Python-2.7.13/INSTALL/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/home/user_jp/srcMisc/Python-2.7.13/INSTALL/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
File "/home/user_jp/srcMisc/Python-2.7.13/INSTALL/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/home/user_jp/srcMisc/Python-2.7.13/INSTALL/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
UPDATE를 :
building '_hashlib' extension
gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/p/home/user_jp/srcMisc/Python-2.7.13/INSTALL/include -I. -IInclude -I./Include -I/usr/lo
cal/include -I/p/home/user_jp/srcMisc/Python-2.7.13/Include -I/p/home/user_jp/srcMisc/Python-2.7.13 -c /p/home/user_jp/srcMisc/Python-2.7.13/Modules/_hashopenssl.c -o build/temp.linux-x8
6_64-2.7/p/home/user_jp/srcMisc/Python-2.7.13/Modules/_hashopenssl.o
In file included from /usr/include/openssl/asn1.h:74:0,
from /usr/include/openssl/objects.h:960,
from /usr/include/openssl/evp.h:98,
from /p/home/user_jp/srcMisc/Python-2.7.13/Modules/_hashopenssl.c:39:
/p/home/apps/gmpapp/gcc_dir/platform/gcc-4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/include-fixed/openssl/bn.h:610:1: error: unknown type name 'CRYPTO_THREADID'
CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
^
나는이 문제를 해결하는 방법 : 난 그냥 파이썬 빌드가 hashlib 모듈을 구축하는 데 실패 실현 ? 문제는/usr/include/openssl에있는 openssl 헤더를 찾는 것일 수 있지만 내 자신의 openssl 설치를 사용하려고합니다.