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

标签 gcc centos

我正在尝试通过 pip install pydeep 在 CentOS 64b 上安装 pydeep,但我得到了这个: 错误:命令“gcc”失败,退出状态为 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

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

提前致谢!

最佳答案

对于遇到此问题的任何其他人,运行以下命令为我在 Ubuntu 中修复了 pydeep 编译问题:

sudo apt-get install python-dev libfuzzy-dev

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

关于gcc - 安装 pydeep 时命令 'gcc' 失败,退出状态为 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25053826/

相关文章:

c++ - 如何实现用gcc-4.4编译的大 vector 初始化?

c - C 中对 <symbol> 的未解析引用。Makefile 似乎顺序为 : gcc command is perfectly fine according to the suggestions

linux - 预期的声明说明符或 ‘...’ 之前的 ‘FILE’

php - 找不到cron命令-CentOS 7

python - 获取错误/usr/bin/env : node : Permission Denied

apache - Laravel 4.1 登录路由显示空白页

Eclipse Arduino make : *** error 1

c++ - 如何在gcc中排除当前路径下的 header

linux - 进程卡在linux桌面

wordpress - 尝试安装 php-gd 时出错