Import bcrypt Error
zclonely opened this issue · comments
python 3.8
arm8155
when i import bcryot, cannot open shared object file: No such file or directory
eroor
i moved bcrypt dict to virtual env, because pip install is not success, ERROR: Could not build wheels for pynacl which use PEP 517 and cannot be installed directly
Is there angbody can help me? plz~~
(venv) root@master:/opt/ota_backend_vehicle/vehicle_backend$ python3 ota_pkg_main.py fg
/home/worker/opt/ota_backend_vehicle/vehicle_backend/config/ota_config.json
Traceback (most recent call last):
File "ota_pkg_main.py", line 4, in <module>
from ota_pkg import OtaPkgDaemon
File "/home/worker/opt/ota_backend_vehicle/vehicle_backend/ota_pkg/__init__.py", line 8, in <module>
from utils import(
File "/home/worker/opt/ota_backend_vehicle/vehicle_backend/utils/__init__.py", line 28, in <module>
from .ssh_connection import SSH_CONNECTION
File "/home/worker/opt/ota_backend_vehicle/vehicle_backend/utils/ssh_connection.py", line 2, in <module>
import paramiko
File "/opt/ota_backend_vehicle/depends/venv/lib/python3.8/site-packages/paramiko/__init__.py", line 22, in <module>
from paramiko.transport import SecurityOptions, Transport
File "/opt/ota_backend_vehicle/depends/venv/lib/python3.8/site-packages/paramiko/transport.py", line 89, in <module>
from paramiko.dsskey import DSSKey
File "/opt/ota_backend_vehicle/depends/venv/lib/python3.8/site-packages/paramiko/dsskey.py", line 37, in <module>
from paramiko.pkey import PKey
File "/opt/ota_backend_vehicle/depends/venv/lib/python3.8/site-packages/paramiko/pkey.py", line 31, in <module>
import bcrypt
File "/opt/ota_backend_vehicle/depends/venv/lib/python3.8/site-packages/bcrypt/__init__.py", line 25, in <module>
from . import _bcrypt
ImportError: /opt/ota_backend_vehicle/depends/venv/lib/python3.8/site-packages/bcrypt/_bcrypt.abi3.so: cannot open shared object file: No such file or directory
(venv) root@master:/opt/ota_backend_vehicle/vehicle_backend$ pip install paramiko
Requirement already satisfied: paramiko in /home/worker/compass/depends/venv/lib/python3.8/site-packages (2.7.2)
Collecting pynacl>=1.0.1
Using cached PyNaCl-1.4.0.tar.gz (3.4 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: bcrypt>=3.1.3 in /home/worker/compass/depends/venv/lib/python3.8/site-packages (from paramiko) (3.2.0)
Requirement already satisfied: cryptography>=2.5 in /home/worker/compass/depends/venv/lib/python3.8/site-packages (from paramiko) (3.3.1)
Requirement already satisfied: cffi>=1.1 in /home/worker/compass/depends/venv/lib/python3.8/site-packages (from bcrypt>=3.1.3->paramiko) (1.14.5)
Requirement already satisfied: six>=1.4.1 in /home/worker/compass/depends/venv/lib/python3.8/site-packages (from bcrypt>=3.1.3->paramiko) (1.16.0)
Requirement already satisfied: pycparser in /home/worker/compass/depends/venv/lib/python3.8/site-packages (from cffi>=1.1->bcrypt>=3.1.3->paramiko) (2.20)
Building wheels for collected packages: pynacl
Building wheel for pynacl (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /home/worker/run/compass/depends/venv/bin/python3 /home/worker/run/compass/depends/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp54ajmftu
cwd: /var/volatile/tmp/pip-install-7zkb0cli/pynacl_e7b751677d31437ba09a01151a2df916
Complete output (104 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.8
creating build/lib.linux-aarch64-3.8/nacl
copying src/nacl/utils.py -> build/lib.linux-aarch64-3.8/nacl
copying src/nacl/signing.py -> build/lib.linux-aarch64-3.8/nacl
copying src/nacl/secret.py -> build/lib.linux-aarch64-3.8/nacl
copying src/nacl/public.py -> build/lib.linux-aarch64-3.8/nacl
copying src/nacl/hashlib.py -> build/lib.linux-aarch64-3.8/nacl
copying src/nacl/hash.py -> build/lib.linux-aarch64-3.8/nacl
copying src/nacl/exceptions.py -> build/lib.linux-aarch64-3.8/nacl
copying src/nacl/encoding.py -> build/lib.linux-aarch64-3.8/nacl
copying src/nacl/__init__.py -> build/lib.linux-aarch64-3.8/nacl
creating build/lib.linux-aarch64-3.8/nacl/pwhash
copying src/nacl/pwhash/scrypt.py -> build/lib.linux-aarch64-3.8/nacl/pwhash
copying src/nacl/pwhash/argon2id.py -> build/lib.linux-aarch64-3.8/nacl/pwhash
copying src/nacl/pwhash/argon2i.py -> build/lib.linux-aarch64-3.8/nacl/pwhash
copying src/nacl/pwhash/_argon2.py -> build/lib.linux-aarch64-3.8/nacl/pwhash
copying src/nacl/pwhash/__init__.py -> build/lib.linux-aarch64-3.8/nacl/pwhash
creating build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/utils.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/sodium_core.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/randombytes.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/crypto_sign.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/crypto_shorthash.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/crypto_secretstream.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/crypto_secretbox.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/crypto_scalarmult.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/crypto_pwhash.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/crypto_kx.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/crypto_hash.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/crypto_generichash.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/crypto_core.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/crypto_box.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/crypto_aead.py -> build/lib.linux-aarch64-3.8/nacl/bindings
copying src/nacl/bindings/__init__.py -> build/lib.linux-aarch64-3.8/nacl/bindings
running build_clib
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
checking for gcc... aarch64-oe-linux-gcc -march=armv8-a -mcpu=cortex-a57 -mtune=cortex-a57
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/var/volatile/tmp/pip-install-7zkb0cli/pynacl_e7b751677d31437ba09a01151a2df916/build/temp.linux-aarch64-3.8':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Traceback (most recent call last):
File "/home/worker/run/compass/depends/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 280, in <module>
main()
File "/home/worker/run/compass/depends/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/worker/run/compass/depends/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 204, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/var/volatile/tmp/pip-build-env-8z2wd_3i/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 221, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/var/volatile/tmp/pip-build-env-8z2wd_3i/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 207, in _build_with_temp_dir
self.run_setup()
File "/var/volatile/tmp/pip-build-env-8z2wd_3i/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 150, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 216, in <module>
setup(
File "/var/volatile/tmp/pip-build-env-8z2wd_3i/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/var/volatile/tmp/pip-build-env-8z2wd_3i/overlay/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 176, in run
subprocess.check_call(
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/var/volatile/tmp/pip-install-7zkb0cli/pynacl_e7b751677d31437ba09a01151a2df916/src/libsodium/configure', '--disable-shared', '--enable-static', '--disable-debug', '--disable-dependency-tracking', '--with-pic', '--prefix', '/var/volatile/tmp/pip-install-7zkb0cli/pynacl_e7b751677d31437ba09a01151a2df916/build/temp.linux-aarch64-3.8']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for pynacl
Failed to build pynacl
ERROR: Could not build wheels for pynacl which use PEP 517 and cannot be installed directly
@zclonely This is the relevant part of the log:
checking whether we are cross compiling... configure: error: in `/var/volatile/tmp/pip-install-7zkb0cli/pynacl_e7b751677d31437ba09a01151a2df916/build/temp.linux-aarch64-3.8':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
For some reason, autoconf
decides it cannot run C executables built locally, and aborts.
You should look at the config.log
file to debug that (presumably under /var/volatile/tmp/pip-install-*/pynacl_*/src/libsodium/
)