安装 SWI-Prolog 时未满足的依赖关系

安装 SWI-Prolog 时未满足的依赖关系

当尝试使用 下载 SWI-Prolog 时sudo apt-get install swi-prolog,我收到一系列错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libpython3-dev : Depends: libpython3.5-dev (>= 3.5.1-2~) but it is not installable
python3.5-dev : Depends: python3.5 (= 3.5.2-2ubuntu0~16.04.4) but 3.5.2-2ubuntu0~16.04.3 is to be 
installed
             Depends: libpython3.5-dev (= 3.5.2-2ubuntu0~16.04.4) but it is not installable
             Depends: libpython3.5 (= 3.5.2-2ubuntu0~16.04.4) but 3.5.2-2ubuntu0~16.04.3 is to be 
installed
swi-prolog-nox : Depends: libossp-uuid16 but it is not going to be installed
              Depends: libreadline7 (>= 6.0) but it is not going to be installed
              Depends: libssl1.1 (>= 1.1.0) but it is not going to be installed
              Depends: libedit-dev but it is not going to be installed
              Depends: libgmp-dev but it is not going to be installed
              Depends: libncursesw5-dev but it is not going to be installed
              Depends: libreadline-dev but it is not going to be installed
              Recommends: debhelper but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

我确实尝试过apt-get -f install,但引发了错误:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libpython3-dev : Depends: libpython3.5-dev (>= 3.5.1-2~) but it is not 
installable
python3.5-dev : Depends: python3.5 (= 3.5.2-2ubuntu0~16.04.4) but 3.5.2- 
2ubuntu0~16.04.3 is installed
             Depends: libpython3.5-dev (= 3.5.2-2ubuntu0~16.04.4) but it is 
not installable
             Depends: libpython3.5 (= 3.5.2-2ubuntu0~16.04.4) but 3.5.2- 
2ubuntu0~16.04.3 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by 
held packages.
E: Unable to correct dependencies

sudo apt-get update使用或进行完整更新时我也遇到同样的问题upgrade。我该如何修复这些错误?

谢谢!

答案1

回答我的问题....我必须全新安装 Ubuntu。现在是 20.04。

相关内容