安装 scrapy 0.22 时出错(在 Ubuntu 12.04 上):'gcc' 失败,退出状态为 1 [英] Error installing scrapy 0.22 (on Ubuntu 12.04): 'gcc' failed with exit status 1
问题描述
尝试使用 pip 从命令行安装 Scrapy 时sudo pip install scrapy
我收到以下错误:错误:命令gcc"失败,退出状态为 1
When trying to install Scrapy from the command line using pip
sudo pip install scrapy
I get the following error:
error: command 'gcc' failed with exit status 1
查看错误输出中的几行,我发现在尝试安装似乎是 pyOpenSSL 依赖项的cryptography"包时发生错误
Looking a few lines up in the error output, I see that the error occurs while trying to install the 'cryptography' package which seems to be a dependency of pyOpenSSL
我尝试单独安装 pyOpenSSL,但它给出了相同的错误.通读错误输出,我发现此错误的可能原因是缺少文件:
I tried installing pyOpenSSL on its own and it gives the same error. Reading through the error output, I find that the likely cause of this error is a missing file:
ffi.h:没有那个文件或目录
我应该如何从这里开始?
How should I proceed from here?
推荐答案
尝试
sudo apt-get install libffi libffi-dev
这篇关于安装 scrapy 0.22 时出错(在 Ubuntu 12.04 上):'gcc' 失败,退出状态为 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!