首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何在ubuntu上安装密码术?

如何在ubuntu上安装密码术?
EN

Stack Overflow用户
提问于 2016-02-02 11:31:15
回答 2查看 64.1K关注 0票数 71

我的ubuntu是14.04 LTS。

当我安装加密技术时,错误是:

代码语言:javascript
复制
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

我不知道它为什么会失败。原因是什么?在ubuntu系统上安装有必要吗?

EN

回答 2

Stack Overflow用户

发布于 2016-02-17 23:25:37

当pip在Ubuntu 14.04上安装加密模块时,我也遇到了同样的问题。我通过安装libffi-dev解决了这个问题:

代码语言:javascript
复制
apt-get install -y libffi-dev

然后我得到了以下错误:

代码语言:javascript
复制
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

我通过安装libssl-dev解决了这个问题:

代码语言:javascript
复制
apt-get install -y libssl-dev
票数 48
EN

Stack Overflow用户

发布于 2018-05-09 03:08:02

在ubuntu 16.04上安装libssl-dev和python-dev对我来说已经足够了。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35144550

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档