1

I'm using Ubuntu 14.04. I was trying to install pyopenssl on my machine. However it always fail with this info. I searched it on the google but didn't find any solution:

gcc -pthread -shared /tmp/pip_build_pi314/cryptography/cryptography/hazmat/bindings/__pycache__/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_79a5b0a3x3a8a382.o -L/home/pi314/anaconda/lib -lcrypto -lssl -lpython2.7 -o /tmp/pip_build_pi314/cryptography/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_79a5b0a3x3a8a382.so

Traceback (most recent call last):

File "/tmp/pip_build_pi314/cryptography/setup.py", line 88, in finalize_options

self.distribution.ext_modules = get_ext_modules()

File "/tmp/pip_build_pi314/cryptography/setup.py", line 68, in get_ext_modules

OpenSSLBinding().ffi.verifier.get_extension(),

File "cryptography/hazmat/bindings/openssl/binding.py", line 89, in __init__

self._ensure_ffi_initialized()

File "cryptography/hazmat/bindings/openssl/binding.py", line 109, in _ensure_ffi_initialized

libraries=libraries,

File "cryptography/hazmat/bindings/utils.py", line 80, in build_ffi

extra_link_args=extra_link_args,

File "/tmp/pip_build_pi314/cryptography/cffi-0.8.6-py2.7-linux-x86_64.egg/cffi/api.py", line 340, in verify

lib = self.verifier.load_library()

File "/tmp/pip_build_pi314/cryptography/cffi-0.8.6-py2.7-linux-x86_64.egg/cffi/verifier.py", line 75, in load_library

return self._load_library()

File "/tmp/pip_build_pi314/cryptography/cffi-0.8.6-py2.7-linux-x86_64.egg/cffi/verifier.py", line 151, in _load_library

return self._vengine.load_library()

File "/tmp/pip_build_pi314/cryptography/cffi-0.8.6-py2.7-linux-x86_64.egg/cffi/vengine_cpy.py", line 149, in load_library

raise ffiplatform.VerificationError(error)

cffi.ffiplatform.VerificationError: importing '/tmp/pip_build_pi314/cryptography/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_79a5b0a3x3a8a382.so': /tmp/pip_build_pi314/cryptography/cryptography/hazmat/bindings/__pycache__/_Cryptography_cff i_79a5b0a3x3a8a382.so: undefined symbol: EC_GFp_nistp224_method
user3859184
  • 11
  • 1
  • 2

2 Answers2

5

Since you are on Ubuntu, you need to install libssl-dev

sudo apt-get install libssl-dev

You also need libffi-devel and python-dev

sudo apt-get install libffi-dev python-dev

Phalgun
  • 1,468
  • 2
  • 15
  • 24
  • 2
    I think the right package is `libffi-dev` as written here: http://packages.ubuntu.com/trusty/libffi-dev and not `libffi-devel` – lcipriani Jan 07 '15 at 16:32
1

You have to install the openssl-devel libs

yum install openssl-devel

See here as the reference.

Community
  • 1
  • 1
Avinash Babu
  • 6,171
  • 3
  • 21
  • 26
  • 3
    Yum is probably not the right choice here. Use apt-get and the debian specific ssl library. Refer http://stackoverflow.com/a/27272924/498313 for the exact commands. – Phalgun Dec 03 '14 at 13:28