Help me to get rid of unmet dependencies [duplicate]

when I try to install it shows this. Help me to get rid of it. I tried to install codeblocks once with dpkg command. I am using 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).


Solution 1:

I suggest you do the following commands that might install the software and remove the error message

sudo apt --fix-broken install

sudo apt update

sudo apt-get upgrade

sudo apt install codeblocks