Install python module pykerberos error

问题描述

通过pip install sparkmagic的过程中, 报错依赖pykerberos安装错误.

单独安装’pykerberos’以便提供单独错误信息:

$ pip install pykerberos
Collecting pykerberos
  Using cached https://files.pythonhosted.org/packages/9a/b8/1ec56b6fa8a2e2a81420bd3d90e70b59fc83f6b857fb2c2c37accddc8be3/pykerberos-1.2.1.tar.gz
Building wheels for collected packages: pykerberos
  Building wheel for pykerberos (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/luban/miniconda/envs/sqlflow-dev/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3dgl_bk7/pykerberos/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3dgl_bk7/pykerberos/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-uw9la1f5 --python-tag cp35
       cwd: /tmp/pip-install-3dgl_bk7/pykerberos/
  Complete output (12 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'kerberos' extension
  creating build
  creating build/temp.linux-x86_64-3.5
  creating build/temp.linux-x86_64-3.5/src
  gcc -pthread -B /home/luban/miniconda/envs/sqlflow-dev/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/luban/miniconda/envs/sqlflow-dev/include/python3.5m -c src/kerberos.c -o build/temp.linux-x86_64-3.5/src/kerberos.o
  In file included from src/kerberos.c:19:0:
  src/kerberosbasic.h:17:27: fatal error: gssapi/gssapi.h: No such file or directory
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pykerberos
  Running setup.py clean for pykerberos
Failed to build pykerberos
Installing collected packages: pykerberos
  Running setup.py install for pykerberos ... error
    ERROR: Command errored out with exit status 1:
     command: /home/luban/miniconda/envs/sqlflow-dev/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3dgl_bk7/pykerberos/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3dgl_bk7/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-record-pwl7zqz5/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-3dgl_bk7/pykerberos/
    Complete output (12 lines):
    running install
    running build
    running build_ext
    building 'kerberos' extension
    creating build
    creating build/temp.linux-x86_64-3.5
    creating build/temp.linux-x86_64-3.5/src
    gcc -pthread -B /home/luban/miniconda/envs/sqlflow-dev/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/luban/miniconda/envs/sqlflow-dev/include/python3.5m -c src/kerberos.c -o build/temp.linux-x86_64-3.5/src/kerberos.o
    In file included from src/kerberos.c:19:0:
    src/kerberosbasic.h:17:27: fatal error: gssapi/gssapi.h: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/luban/miniconda/envs/sqlflow-dev/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3dgl_bk7/pykerberos/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3dgl_bk7/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-record-pwl7zqz5/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

解决方案

通过安装libkrb5-dev解决问题

sudo apt-get install libkrb5-dev

References

Install pykerberos error

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据