Unable to install gcc (Ubuntu 18.04 mate)
The following packages have unmet dependencies:
gcc : Depends: gcc-7 (>= 7.3.0-12~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I have tried a lot of apt commands without any solution, tried those:
dpkg --get-selections | grep hold
apt update ; apt autoremove
with aptitude I get some more information.
$ aptitude install gcc
The following NEW packages will be installed:
gcc gcc-7{ab} libasan4{ab} libatomic1{ab} libc-dev-bin{a} libc6-dev{a} libcilkrts5{ab} libgcc-7-dev{ab} libitm1{ab} liblsan0{ab} libmpx2{ab}
libquadmath0{ab} libtsan0{ab} libubsan0{ab} linux-libc-dev{a} manpages-dev{a}
0 packages upgraded, 16 newly installed, 0 to remove and 0 not upgraded.
Need to get 16,8 MB of archives. After unpacking 73,2 MB will be used.
The following packages have unmet dependencies:
libgcc-7-dev : Depends: gcc-7-base (= 7.3.0-16ubuntu3) but 7.3.0-27ubuntu1~18.04 is installed
libmpx2 : Depends: gcc-8-base (= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed
libitm1 : Depends: gcc-8-base (= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed
libcilkrts5 : Depends: gcc-7-base (= 7.3.0-16ubuntu3) but 7.3.0-27ubuntu1~18.04 is installed
libasan4 : Depends: gcc-7-base (= 7.3.0-16ubuntu3) but 7.3.0-27ubuntu1~18.04 is installed
libquadmath0 : Depends: gcc-8-base (= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed
libtsan0 : Depends: gcc-8-base (= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed
libubsan0 : Depends: gcc-7-base (= 7.3.0-16ubuntu3) but 7.3.0-27ubuntu1~18.04 is installed
gcc-7 : Depends: cpp-7 (= 7.3.0-16ubuntu3) but 7.3.0-27ubuntu1~18.04 is installed
Depends: gcc-7-base (= 7.3.0-16ubuntu3) but 7.3.0-27ubuntu1~18.04 is installed
liblsan0 : Depends: gcc-8-base (= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed
libatomic1 : Depends: gcc-8-base (= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) gcc [Not Installed]
2) gcc-7 [Not Installed]
3) libasan4 [Not Installed]
4) libatomic1 [Not Installed]
5) libcilkrts5 [Not Installed]
6) libgcc-7-dev [Not Installed]
7) libitm1 [Not Installed]
8) liblsan0 [Not Installed]
9) libmpx2 [Not Installed]
10) libquadmath0 [Not Installed]
11) libtsan0 [Not Installed]
12) libubsan0 [Not Installed]