gnutls.h: No such file or directory 的解决方案

In file included from src/docstrings.c:4:0:

src/pycurl.h:148:30: fatal error: gnutls/gnutls.h: No such file or directory

 #   include <gnutls/gnutls.h>

                              ^

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-da6mXW/pycurl/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('
', '
'), __file__, 'exec'))" install --record /tmp/pip-Q729Pd-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-da6mXW/pycurl
Storing debug log for failure in /root/.pip/pip.log

同上文一样,同样是在安装 pyspider 的过程中遇到的问题。

解决方案:

apt-get install libghc-gnutls-dev

安装一大堆东西之后,再次执行 pip 命令,即可完成安装。