安装python-snappy时出错:snappy-c.h:没有这样的文件或目录 [英] Error installing python-snappy: snappy-c.h: No such file or directory

查看:1348
本文介绍了安装python-snappy时出错:snappy-c.h:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用amazon ec2 ubuntu 11.04服务器
$ b $ pre $ sudo pip install python-snappy

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



我得到了错误:

 正在运行的构建
正在运行build_ext
构建'snappy'扩展
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:警告:命令行选项'-Wstrict-prototypes'适用于Ada / C / ObjC,但不适用于C ++ [默认启用]
snappymodule.cc:31: 22:致命错误:snappy-ch:没有这样的文件或目录
编译终止。
error:command'gcc'failed with exit status 1

我怎么能摆脱这个错误?



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

解决方案

您需要Snappy C 然后你必须安装python-snappy wrapper。



看起来你并没有安装Snappy-C库



试试吧..已经是一位评论员对你的帖子发表了评论 p>

I am using amazon ec2 ubuntu 11.04 server

 sudo pip install python-snappy 

also I tried to downloaded package and entered "sudo python setup.py install"

I got the error:

  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

How i could get rid of this error?

source: https://github.com/andrix/python-snappy

解决方案

You need Snappy C library

Then you have to install python-snappy wrapper.

It seems you didn't install Snappy-C library

Try it ..as already a fellow commented for your post

这篇关于安装python-snappy时出错:snappy-c.h:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆