I upgraded my Linux box from Ubuntu 18.04 to 20.04.
I need to install the clang suite of compilers and the apt command is giving me errors. I've searched many possible solutions but so far none of the recommendations I have found to solve similar problems have helped. Here is what I get when I try apt install clang :
➜ ~ sudo apt-get install -f clang
Reading package lists... Done Building dependency tree
Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:
The following packages have unmet dependencies: clang : Depends: clang-10 (>= 10~) but it is not going to be installed E: Unable to correct problems, you have held broken packages. ➜ ~
I've done all sorts of apt-get update and apt-get upgrade. I've also tried to list every package one after the other, but the list keeps growing and it hasn't solved the issue.
Edit: Following @Martin Konrad I tried aptitude:
➜ ~ sudo aptitude install clang The following NEW packages will be installed: clang clang-10{ab} lib32gcc-s1{ab} lib32gcc1{ab} lib32stdc++6{ab} libc6-i386{a} libclang-common-10-dev{ab} libclang-cpp10{ab} libffi-dev{a} libobjc-9-dev{ab} libobjc4{ab} libomp-10-dev{a} libomp5-10{a} libpfm4{a} libz3-4{a} libz3-dev{a} llvm-10{a} llvm-10-dev{ab} llvm-10-runtime{a} llvm-10-tools{a} python3-pygments{a} 0 packages upgraded, 21 newly installed, 0 to remove and 9 not upgraded. Need to get 58.4 MB of archives. After unpacking 381 MB will be used. The following packages have unmet dependencies: lib32stdc++6 : Depends: gcc-10-base (= 10-20200411-0ubuntu1) but 10-20200416-0ubuntu1~18.04 is installed libobjc4 : Depends: gcc-10-base (= 10-20200411-0ubuntu1) but 10-20200416-0ubuntu1~18.04 is installed lib32gcc-s1 : Depends: gcc-10-base (= 10-20200411-0ubuntu1) but 10-20200416-0ubuntu1~18.04 is installed clang-10 : Depends: libclang1-10 (= 1:10.0.0-4ubuntu1) but 1:10.0.1~++20200519100828+f79cd71e145-1~exp1~20200519201452.38 is installed lib32gcc1 : Depends: gcc-10-base (= 10-20200411-0ubuntu1) but 10-20200416-0ubuntu1~18.04 is installed libclang-cpp10 : Depends: libllvm10 (= 1:10.0.0-4ubuntu1) but 1:10.0.1~++20200519100828+f79cd71e145-1~exp1~20200519201452.38 is installed libobjc-9-dev : Depends: gcc-9-base (= 9.3.0-10ubuntu2) but 9.3.0-11ubuntu0~18.04.1 is installed Depends: libgcc-9-dev (= 9.3.0-10ubuntu2) but 9.3.0-11ubuntu0~18.04.1 is installed libclang-common-10-dev : Depends: libllvm10 (= 1:10.0.0-4ubuntu1) but 1:10.0.1~++20200519100828+f79cd71e145-1~exp1~20200519201452.38 is installed llvm-10-dev : Depends: libllvm10 (= 1:10.0.0-4ubuntu1) but 1:10.0.1~++20200519100828+f79cd71e145-1~exp1~20200519201452.38 is installed The following actions will resolve these dependencies: Keep the following packages at their current version: 1) clang [Not Installed] 2) clang-10 [Not Installed] 3) lib32gcc-s1 [Not Installed] 4) lib32gcc1 [Not Installed] 5) lib32stdc++6 [Not Installed] 6) libclang-common-10-dev [Not Installed] 7) libclang-cpp10 [Not Installed] 8) libobjc-9-dev [Not Installed] 9) libobjc4 [Not Installed] 10) llvm-10-dev [Not Installed] Leave the following dependencies unresolved: 11) llvm-10 recommends llvm-10-dev Accept this solution? [Y/n/q/?] Y No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 9 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. Its solution is to not install effectively.