帮助我摆脱未满足的依赖关系

帮助我摆脱未满足的依赖关系

当我尝试安装时,它显示此信息。帮我摆脱它。我尝试使用 dpkg 命令安装 codeblocks 一次。 我正在使用 ubuntu 20.04

reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 codeblocks-contrib : Depends: libboost-system1.62.0 but it is not installable
                      Depends: libhunspell-1.4-0 but it is not installable
                      Depends: libwxgtk3.0-0v5 (>= 3.0.2+dfsg) but it is not installable
                      Depends: libwxsmithlib0 (= 20.03) but 20.03-3 is to be installed
                      Depends: codeblocks (= 20.03) but it is not going to be installed
                      Recommends: valgrind but it is not going to be installed
                      Recommends: cppcheck but it is not going to be installed
                      Recommends: cscope but it is not going to be installed
                      Recommends: cccc but it is not going to be installed
 codeblocks-dev : Depends: libcodeblocks0 (= 20.03) but 20.03-3 is to be installed
 codeblocks-libwxcontrib0 : Depends: libwxgtk3.0-0v5 (>= 3.0.2+dfsg) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

答案1

我建议您执行以下命令,可能会安装软件并删除错误消息

sudo apt --fix-broken install

sudo apt update

sudo apt-get upgrade

sudo apt install codeblocks

答案2

步骤1:

首先,我建议尝试使用整个安装过程aptitude,因为它提供的解决方案大多数时候都有效。

sudo apt update
sudo apt install aptitude    

然后尝试使用以下命令下载您的包aptitude

sudo aptitude install <package-name>

第2步:

如果这不起作用,请尝试逐个下载依赖项,看看问题是否消失。

sudo apt install -f libcodeblocks0=20.03 # -f flag means fix broken
sudo apt install -f libwxgtk3.0-0v5=3.0.2+dfsg
sudo apt install -f libboost-system1.62.0
sudo apt install -f libhunspell-1.4-0
sudo apt install -f libwxsmithlib0=20.03

步骤3:

如果上述步骤也不起作用(我猜可能会发生这种情况,因为有些包被标记为not installable),请尝试从Ubuntu 注册表适用于您的计算机体系结构(我将列出amd64

链接:

libwxgtk3.0-0v5

代码块

libcodeblocks0

libhunspell-1.4-0(右侧,可下载文件下方)

libwxsmithlib0

libboost-系统1.62.0

希望这能解决问题。如果没有,请在下面评论。

相关内容