2014-04-11 5 views
0

py를 사용하여 pyOpenSSL을 설치하려고합니다. Python 버전은 2.7이고, OS는 Linux입니다. pyOpenSSL 설치 후 내가 파이썬에서 모듈을 수입하려고 할 때, 나는 다음과 같은 오류 있어요 :pyOpenSSL 설치 중 오류가 발생했습니다.

Python 2.7.5 (default, Jun 27 2013, 03:17:39) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import OpenSSL 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/usr/local/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module> 
    from OpenSSL import rand, crypto, SSL 
    File "/usr/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 84, in <module> 
    OP_NO_TICKET = _lib.SSL_OP_NO_TICKET 
AttributeError: 'FFILibrary' object has no attribute 'SSL_OP_NO_TICKET' 
>>> 

내가 pyOpenSSL을 제거하고 다시 설치하려고,하지만 같은 오류가 발생했습니다.

+0

"암호화"를 제거하고 다시 설치 (또는 --upgrade) 할 수 있습니까? –

답변

0

수정 프로그램은 여기에 설명되어 있습니다 : 실제로 https://github.com/pyca/pyopenssl/issues/130

, 당신은 수동으로 적용 할 수 있습니다 (정말 좋습니다,하지만 쉬운 일이 아닙니다) 또는 다운로드 아카이브를 github에 수정에 대한 링크에서 : https://github.com/pyca/pyopenssl/commit/e7a6939a22a4290fff7aafe39dd0db85157d5e05

그리고 SSL.py에 적용된 수정

-OP_NO_TICKET = _lib.SSL_OP_NO_TICKET 
+try: 
+ OP_NO_TICKET = _lib.SSL_OP_NO_TICKET 
+except AttributeError: 
+ pass 
관련 문제