错误:安装脚本因错误退出:命令‘x86_64-linux-gnu-gcc’失败,退出状态为 1

错误:安装脚本因错误退出:命令‘x86_64-linux-gnu-gcc’失败,退出状态为 1

我在 14.04 Ubuntu 服务器的终端中运行了以下命令

$ cd reddit/r2
$ python setup.py build
$ sudo python setup.py develop

最后一行之后我收到一个错误,请查看下面的终端行。

root@dedi-fr-32312:~# cd reddit/r2
root@dedi-fr-32312:~/reddit/r2# python setup.py build
Cannot find Cython. Skipping Cython build.
Cannot find Baseplate. Skipping Thrift build.
running build
running build_py
running build_ext
root@dedi-fr-32312:~/reddit/r2# sudo python setup.py develop
Cannot find Cython. Skipping Cython build.
Cannot find Baseplate. Skipping Thrift build.
running develop
running egg_info
writing requirements to r2.egg-info/requires.txt
writing r2.egg-info/PKG-INFO
writing top-level names to r2.egg-info/top_level.txt
writing dependency_links to r2.egg-info/dependency_links.txt
writing entry points to r2.egg-info/entry_points.txt
reading manifest file 'r2.egg-info/SOURCES.txt'
writing manifest file 'r2.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-x86_64-2.7/Cfilters.so -> 
Creating /usr/local/lib/python2.7/dist-packages/r2.egg-link (link to .)
r2 0.0.0dev is already the active version in easy-install.pth

Installed /root/reddit/r2
Processing dependencies for r2==0.0.0dev
Searching for python-snappy
Reading https://pypi.python.org/simple/python-snappy/
Best match: python-snappy 0.5
Downloading     https://pypi.python.org/packages/70/fa/621594e313b2b9074585af63668f7a314e4d69df536ab592e6e1e353/python-snappy-0.5.tar.gz#md5=044fb0ac21888c0b4eee0c4f15e75504
Processing python-snappy-0.5.tar.gz
Writing /tmp/easy_install-nSKzTM/python-snappy-0.5/setup.cfg
Running python-snappy-0.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-nSKzTM/python-snappy-0.5/egg-dist-tmp-EgXgE7
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
snappymodule.cc:31:22: fatal error: snappy-c.h: No such file or directory
#include <snappy-c.h>
                  ^
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
root@dedi-fr-32312:~/reddit/r2# 

有什么帮助可以解决它吗?

答案1

回答于评论经过OP

已解决。缺少 Python-snappy

相关内容