命令' gcc'安装pydeep时退出状态为1失败

时间:2014-07-31 08:09:31

标签: gcc centos

我正在尝试通过pip install pydeep在CentOS 64b上安装pydeep,但我得到了这个: error: command 'gcc' failed with exit status 1。试图安装gcc和许多其他像python-dev等,但仍然没有结果。我还从GitHub克隆它并尝试: python setup.py build但是我遇到了同样的问题(注意我已经有了libssdeep)。

Downloading/unpacking pydeep
  Running setup.py egg_info for package pydeep
Installing collected packages: pydeep
  Running setup.py install for pydeep
    building 'pydeep' extension
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c pydeep.c -o build/temp.linux-x86_64-2.6/pydeep.o
    pydeep.c:2:19: error: fuzzy.h: No such file or directory
    pydeep.c: In function ‘pydeep_hash_file’:
    pydeep.c:33: error: ‘FUZZY_MAX_RESULT’ undeclared (first use in this function)
    pydeep.c:33: error: (Each undeclared identifier is reported only once
    pydeep.c:33: error: for each function it appears in.)
    pydeep.c:38: warning: implicit declaration of function ‘fuzzy_hash_file’
    pydeep.c: In function ‘pydeep_hash_buf’:
    pydeep.c:64: error: ‘FUZZY_MAX_RESULT’ undeclared (first use in this function)
    pydeep.c:72: warning: implicit declaration of function ‘fuzzy_hash_buf’
    pydeep.c: In function ‘pydeep_compare’:
    pydeep.c:90: warning: implicit declaration of function ‘fuzzy_compare’
    error: command 'gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-bogdan/pydeep/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EQweL1-record/install-record.txt --single-version-externally-managed:
    running install

running build

running build_ext

building 'pydeep' extension

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c pydeep.c -o build/temp.linux-x86_64-2.6/pydeep.o

pydeep.c:2:19: error: fuzzy.h: No such file or directory

pydeep.c: In function ‘pydeep_hash_file’:

pydeep.c:33: error: ‘FUZZY_MAX_RESULT’ undeclared (first use in this function)

pydeep.c:33: error: (Each undeclared identifier is reported only once

pydeep.c:33: error: for each function it appears in.)

pydeep.c:38: warning: implicit declaration of function ‘fuzzy_hash_file’

pydeep.c: In function ‘pydeep_hash_buf’:

pydeep.c:64: error: ‘FUZZY_MAX_RESULT’ undeclared (first use in this function)

pydeep.c:72: warning: implicit declaration of function ‘fuzzy_hash_buf’

pydeep.c: In function ‘pydeep_compare’:

pydeep.c:90: warning: implicit declaration of function ‘fuzzy_compare’

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-bogdan/pydeep/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EQweL1-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-bogdan/pydeep
Storing complete log in /root/.pip/pip.log

如果您需要完整的日志或某些特定信息,我会尽快提供。

提前致谢!

1 个答案:

答案 0 :(得分:11)

对于其他任何绊脚石的人,运行以下内容修复了Ubuntu中的pydeep编译问题:

sudo apt-get install python-dev libfuzzy-dev

pydeep的setup.py需要以root身份运行