반응형
우분투에 암호화를 설치하는 방법은 무엇입니까?
내 우분투는 14.04 LTS입니다.
암호화를 설치할 때 오류는 다음과 같습니다.
Installing egg-scripts.
uses namespace packages but the distribution does not require setuptools.
Getting distribution for 'cryptography==0.2.1'.
no previously-included directories found matching 'documentation/_build'
zip_safe flag not set; analyzing archive contents...
six: module references __path__
Installed /tmp/easy_install-oUz7ei/cryptography-0.2.1/.eggs/six-1.10.0-py2.7.egg
Searching for cffi>=0.8
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 1.5.0
Downloading https://pypi.python.org/packages/source/c/cffi/cffi-1.5.0.tar.gz#md5=dec8441e67880494ee881305059af656
Processing cffi-1.5.0.tar.gz
Writing /tmp/easy_install-oUz7ei/cryptography-0.2.1/temp/easy_install-Yf2Yl3/cffi-1.5.0/setup.cfg
Running cffi-1.5.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-oUz7ei/cryptography-0.2.1/temp/easy_install-Yf2Yl3/cffi-1.5.0/egg-dist-tmp-A2kjMD
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
An error occurred when trying to install cryptography 0.2.1. Look above this message for any errors that were output by easy_install.
While:
Installing egg-scripts.
Getting distribution for 'cryptography==0.2.1'.
Error: Couldn't install: cryptography 0.2.1
왜 실패했는지 모르겠습니다. 그 이유는 무엇입니까? 우분투 시스템에 설치할 때 필요한 것이 있습니까?
대답은 Angelos의 대답을 거의 반영하는 cryptography
' 설치 섹션 의 문서에 있습니다 .
그것을 인용 :
Debian 및 Ubuntu 의 경우 다음 명령을 사용하면 필요한 종속성이 설치됩니다.
$ sudo apt-get install build-essential libssl-dev libffi-dev python-dev
Fedora 및 RHEL 파생 제품의 경우 다음 명령을 사용하여 필요한 종속성이 설치되었는지 확인합니다.
$ sudo yum install gcc libffi-devel python-devel openssl-devel
이제 일반적인 방법으로 암호화를 빌드하고 설치할 수 있습니다.
$ pip install cryptography
Ubuntu 14.04에 암호화 모듈을 설치할 때 동일한 문제가 발생했습니다. libffi-dev를 설치하여 해결했습니다.
apt-get install -y libffi-dev
그런 다음 다음 오류가 발생했습니다.
build/temp.linux-x86_64-3.4/_openssl.c:431:25: fatal error: openssl/aes.h: No such file or directory
#include <openssl/aes.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Which I resolved by installing libssl-dev:
apt-get install -y libssl-dev
Installing libssl-dev and python-dev was enough for me on ubuntu 16.04.
참고URL : https://stackoverflow.com/questions/35144550/how-to-install-cryptography-on-ubuntu
반응형
'programing tip' 카테고리의 다른 글
awk 부분적으로 문자열 일치 (열 / 단어가 부분적으로 일치하는 경우) (0) | 2020.11.10 |
---|---|
Flask ImportError : Flask라는 모듈이 없습니다. (0) | 2020.11.10 |
tensorflow : AttributeError : 'module'객체에 'mul'속성이 없습니다. (0) | 2020.11.10 |
XML 용 텍스트 데이터를 인코딩하는 가장 좋은 방법 (0) | 2020.11.10 |
문자열에서 Ruby 날짜 객체를 어떻게 생성합니까? (0) | 2020.11.10 |