求助下 Ubuntu 15.10(64 位)下安装 pyspider 下的问题

2016-05-18 00:48:25 +08:00
 itlynn

环境: Ubuntu 15.10(64 位) pip install pyspider 出现如下错误(部分):

Using curl-config (libcurl 7.43.0)
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/curl
copying python/curl/__init__.py -> build/lib.linux-x86_64-2.7/curl
running build_ext
building 'pycurl' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPYCURL_VERSION="7.43.0" -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/include/python2.7 -c src/docstrings.c -o build/temp.linux-x86_64-2.7/src/docstrings.o
In file included from src/docstrings.c:4:0:
src/pycurl.h:170:31: fatal error: openssl/crypto.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-TXbOqA/pycurl/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-HNEDNr-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-TXbOqA/pycurl/

python-dev 已安装。 求助下万能的 V 友,谢谢!

3289 次点击
所在节点    Python
3 条回复
binux
2016-05-18 05:37:04 +08:00
ayaseangle
2016-05-18 07:45:08 +08:00
fatal error: openssl/crypto.h: No such file or directory

大概 openssl-dev 之类的缺失。。。。

这么明显的错误信息还要问?


话说有时候就算遇到笔记陌生的错误信息,扔到 google 里多数都能找到解决方案。。。
itlynn
2016-05-18 10:28:55 +08:00
感谢,已解决!
sudo apt install libpq-dev python-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/279405

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX