安装python-snappy时出错:snappy-c.h:没有这样的文件或目录

我正在使用亚马逊ec2 ubuntu 11.04服务器

 sudo pip install python-snappy 

我也试图下载软件包并输入“sudo python setup.py install”

我收到错误:

  running build
  running build_ext
  building 'snappy' extension
  gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c snappymodule.cc -o build/temp.linux-x86_64-2.7/snappymodule.o
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
  snappymodule.cc:31:22: fatal error: snappy-c.h: No such file or directory
  compilation terminated.
  error: command 'gcc' failed with exit status 1

我如何摆脱这个错误?

来源:https://github.com/andrix/python-snappy

你需要Snappy C library

那么你必须安装python-snappy包装。

看来你没有安装Snappy-C库

已经有人对你的帖子发表了评论

翻译自:https://stackoverflow.com/questions/11416024/error-installing-python-snappy-snappy-c-h-no-such-file-or-directory

转载注明原文:安装python-snappy时出错:snappy-c.h:没有这样的文件或目录