इसलिए मैं अपने pi B + पर चल रहे अपने वेब सर्वर में SSL जोड़ने की कोशिश कर रहा हूं (चेरी का उपयोग करके)
मैंने यह सुनिश्चित किया कि OpenSSL के साथ स्थापित किया गया था:
sudo apt-get install openssl
तब मैंने pyOpenSSL को इसके साथ स्थापित किया:
sudo apt-get install python-openssl
दोनों मामलों में यह कहता है:
openssl is already the newest version.
python-openssl is already the newest version.
क्योंकि मैं एक से अधिक बार कमांड चला चुका हूं। तो यह ठीक लगता है।
तब तक अजगर में जब मैं करता हूं:
import OpenSSL
मुझे त्रुटियाँ मिलती हैं। विशेष रूप से:
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] 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/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/rand.py", line 11, in <module>
from OpenSSL._util import (
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/_util.py", line 3, in <module>
from cryptography.hazmat.bindings.openssl.binding import Binding
ImportError: No module named cryptography.hazmat.bindings.openssl.binding
क्या मेरे पास यहां संगतता समस्या है? क्या दो नवीनतम संस्करण एक-दूसरे के साथ असंगत हैं? इससे पहले किसी ने देखा?
संस्करण जानकारी मेरे पास है:
% openssl version
OpenSSL 1.0.1e 11 Feb 2013
और मेरे लिए अजगर-खुलता है:
% dpkg -s python-openssl
Package: python-openssl
Status: install ok installed
Priority: optional
Section: python
Installed-Size: 532
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Architecture: armhf
Source: pyopenssl
Version: 0.13-2+rpi1+deb7u1
Depends: python (<< 2.8), python (>= 2.6), python-support (>= 0.90.0), libc6 (>= 2.13-28), libssl1.0.0 (>= 1.0.0)
Suggests: python-openssl-doc, python-openssl-dbg
Description: Python 2 wrapper around the OpenSSL library
High-level wrapper around a subset of the OpenSSL library, includes
.
* SSL.Connection objects, wrapping the methods of Python's portable
sockets
* Callbacks written in Python
* Extensive error-handling mechanism, mirroring OpenSSL's error
codes
.
A lot of the object methods do nothing more than calling a
corresponding function in the OpenSSL library.
Homepage: http://launchpad.net/pyopenssl
अजगर पर -v ध्वज का उपयोग करते समय मुझे मिलता है:
>>> import OpenSSL
import OpenSSL # directory /usr/local/lib/python2.7/dist-packages/OpenSSL
# /usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.pyc matches /usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py
import OpenSSL # precompiled from /usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.pyc
# /usr/local/lib/python2.7/dist-packages/OpenSSL/rand.pyc matches /usr/local/lib/python2.7/dist-packages/OpenSSL/rand.py
import OpenSSL.rand # precompiled from /usr/local/lib/python2.7/dist-packages/OpenSSL/rand.pyc
# /usr/lib/python2.7/functools.pyc matches /usr/lib/python2.7/functools.py
import functools # precompiled from /usr/lib/python2.7/functools.pyc
import _functools # builtin
# /usr/local/lib/python2.7/dist-packages/six.pyc matches /usr/local/lib/python2.7/dist-packages/six.py
import six # precompiled from /usr/local/lib/python2.7/dist-packages/six.pyc
# /usr/lib/python2.7/__future__.pyc matches /usr/lib/python2.7/__future__.py
import __future__ # precompiled from /usr/lib/python2.7/__future__.pyc
import itertools # builtin
import operator # builtin
# /usr/lib/python2.7/StringIO.pyc matches /usr/lib/python2.7/StringIO.py
import StringIO # precompiled from /usr/lib/python2.7/StringIO.pyc
# /usr/local/lib/python2.7/dist-packages/OpenSSL/_util.pyc matches /usr/local/lib/python2.7/dist-packages/OpenSSL/_util.py
import OpenSSL._util # precompiled from /usr/local/lib/python2.7/dist-packages/OpenSSL/_util.pyc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/rand.py", line 11, in <module>
from OpenSSL._util import (
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/_util.py", line 3, in <module>
from cryptography.hazmat.bindings.openssl.binding import Binding
ImportError: No module named cryptography.hazmat.bindings.openssl.binding