Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import paramiko, Symbol not found: _crypto_box #1020

Closed
halbertchen opened this issue Jul 20, 2017 · 5 comments
Closed

import paramiko, Symbol not found: _crypto_box #1020

halbertchen opened this issue Jul 20, 2017 · 5 comments
Labels

Comments

@halbertchen
Copy link

When I import python paramiko library, I got this error:

File "/Users/halbert/cloump_admin_cloud_venv/lib/python2.7/site-packages/libcloud/compute/ssh.py", line 23, in <module>
   import paramiko
 File "/Users/halbert/cloump_admin_cloud_venv/lib/python2.7/site-packages/paramiko/__init__.py", line 31, in <module>
   from paramiko.transport import SecurityOptions, Transport
 File "/Users/halbert/cloump_admin_cloud_venv/lib/python2.7/site-packages/paramiko/transport.py", line 57, in <module>
   from paramiko.ed25519key import Ed25519Key
 File "/Users/halbert/cloump_admin_cloud_venv/lib/python2.7/site-packages/paramiko/ed25519key.py", line 22, in <module>
   import nacl.signing
 File "/Users/halbert/cloump_admin_cloud_venv/lib/python2.7/site-packages/nacl/signing.py", line 19, in <module>
   import nacl.bindings
 File "/Users/halbert/cloump_admin_cloud_venv/lib/python2.7/site-packages/nacl/bindings/__init__.py", line 17, in <module>
   from nacl.bindings.crypto_box import (
 File "/Users/halbert/cloump_admin_cloud_venv/lib/python2.7/site-packages/nacl/bindings/crypto_box.py", line 18, in <module>
   from nacl._sodium import ffi, lib
ImportError: dlopen(/Users/halbert/cloump_admin_cloud_venv/lib/python2.7/site-packages/nacl/_sodium.so, 2): Symbol not found: _crypto_box
 Referenced from: /Users/halbert/cloump_admin_cloud_venv/lib/python2.7/site-packages/nacl/_sodium.so
 Expected in: flat namespace
in /Users/halbert/cloump_admin_cloud_venv/lib/python2.7/site-packages/nacl/_sodium.so

Is there anyone meet same error ?

@bitprophet
Copy link
Member

Have not seen this before myself, my guess offhand would be a version mismatch between NaCL and libffi perhaps? If you can post all your versions of libffi/libffi-dev/ffi-devel/whatever those packages are on your OS, plus Python, Paramiko, NaCl, etc - maybe that'll help someone spot a clue.

@rbovill
Copy link

rbovill commented Dec 1, 2017

I also have this issue. I'll do my best to list my package versions, but I have no idea how to find the libffi version on MacOS:
MacOS==10.13.1
Python==2.7
PyNaCl==1.2.0
paramiko==2.4.0
cryptography==2.1.4
pyOpenSSL==0.13.1

Edit: Finally found libffi and got the version
/usr/lib/libffi.dylib:
/usr/lib/libffi.dylib (compatibility version 1.0.0, current version 1.0.0)

@bitprophet
Copy link
Member

bitprophet commented Dec 1, 2017

@rbovill Thanks for the info. FWIW my local dev env has been on PyNaCl 1.1.2, but upgrading to 1.2.0 hasn't reproduced the issue for me.

Re: ffi, I've got venvs with the Python-level lib cffi 1.10.x and 1.11.x and neither has issues. re: libffi itself, I'm actually rusty at delving into shared lib details but seems to be the same version as yours:

» otool -L /Users/jforcier/.virtualenvs/paramiko/lib/python2.7/site-packages/_cffi_backend.so      
/Users/jforcier/.virtualenvs/paramiko/lib/python2.7/site-packages/_cffi_backend.so:
        /usr/lib/libffi.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.51.1)

I'm on macOS 10.12.6 myself; I'm guessing this isn't a 10.12 vs 10.13 issue though since original report was before 10.13 came out.

@rbovill
Copy link

rbovill commented Jan 5, 2018

@bitprophet Any progress on this issue? I'm basically blocked in my work while this issue exists.

@ploxiln
Copy link
Contributor

ploxiln commented Jan 5, 2018

Your issue is in pynacl, try re-installing it. see https://pynacl.readthedocs.io/en/stable/install/
pynacl depends on "cffi". I'd try re-installing the latest versions of both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants