在输入request_kerberos包时出错

时间:2017-06-20 08:16:38

标签: python linux

我不明白问题是什么以及如何解决。当我执行

pip install --upgrade pip

我获得的是

Collecting pykerberos
  Using cached pykerberos-1.1.14.tar.gz
Installing collected packages: pykerberos
  Running setup.py install for pykerberos ... error
    Complete output from command /usr/bin/python2 -u -c "import 
setuptools, tokenize;__file__='/tmp/pip-build-
tlTKls/pykerberos/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', 
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
/tmp/pip-cFs8JW-record/install-record.txt --single-version-externally-
    managed --compile:
    running install
    running build
    running build_ext
    building 'kerberos' extension
    creating build
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/src
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-
D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-
buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE 
-fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -
fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -
grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -
fPIC -I/usr/include/python2.7 -c src/kerberos.c -o build/temp.linux-
x86_64-2.7/src/kerberos.o -DGSSAPI_EXT
    src/kerberos.c:17:20: error fatal: Python.h: No existe el fichero 
o el directorio
     #include <Python.h>
                        ^
    compilación terminada.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, 
tokenize;__file__='/tmp/pip-build-
tlTKls/pykerberos/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', 
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --
record /tmp/pip-cFs8JW-record/install-record.txt --single-version-
externally-managed --compile" failed with error code 1 in /tmp/pip-
build-tlTKls/pykerberos/

我正在安装这个,因为我正在尝试运行kerberos,以便在通过ansible连接时使用它进行身份验证。 Request_kerberos是一个依赖项。

有什么想法吗?

谢谢!

0 个答案:

没有答案