在 ubuntu 20.4 中安装 pgadmin 4 时出错

问题描述

我开始在我的 ubuntu 20.4 机器上安装 pgadmin 4,但我发现了这个问题。当我通过 pip3 install pgadmin4 安装 pgadmin 4 时,我发现了这些问题。任何人都可以帮我解决问题吗?

ERROR: Command errored out with exit status 1:
 command: /root/pgadmin4/bin/python -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n3i52upe/gssapi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n3i52upe/gssapi/setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-n3i52upe/gssapi/pip-egg-info
     cwd: /tmp/pip-install-n3i52upe/gssapi/
Complete output (13 lines):
/bin/sh: 1: krb5-config: not found
In distributed package,building from C files...
Traceback (most recent call last):
  File "<string>",line 1,in <module>
  File "/tmp/pip-install-n3i52upe/gssapi/setup.py",line 109,in <module>
    link_args = shlex.split(get_output(f"{kc} --libs gssapi"))
  File "/tmp/pip-install-n3i52upe/gssapi/setup.py",line 34,in get_output
    res = subprocess.check_output(*args,shell=True,**kwargs)
  File "/usr/lib/python3.8/subprocess.py",line 411,in check_output
    return run(*popenargs,stdout=PIPE,timeout=timeout,check=True,File "/usr/lib/python3.8/subprocess.py",line 512,in run
    raise CalledProcessError(retcode,process.args,subprocess.CalledProcessError: Command 'krb5-config --libs gssapi' returned non-zero exit status 127.
----------------------------------------

错误:命令出错,退出状态为 1:python setup.py egg_info 检查日志以获取完整的命令输出

解决方法

刚刚得到错误,经过一番搜索发现问题来自对Kerberos实现包的依赖: 所以通过安装这个包,问题将得到解决:

sudo apt install libkrb5-dev

https://github.com/pythongssapi/requests-gssapi/issues/14