After trying to install libclang-dev with sudo apt-get install -y libclang-dev i receive this error:

The following packages have unmet dependencies:
 libclang-dev : Depends: libclang-10-dev (>= 10~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

When I try the solution:

 $ wget https://apt.llvm.org/llvm.sh
 $ chmod +x llvm.sh
 $ sudo ./llvm.sh 12

Thiss occurs:

The following packages have unmet dependencies:
 clang-12 : Depends: libclang-common-12-dev (= 1:12.0.1~++20210511012537+24535af52ae1-1~exp1~20210510233243.87) but it is not going to be installed
 clangd-12 : Depends: libclang-common-12-dev (= 1:12.0.1~++20210511012537+24535af52ae1-1~exp1~20210510233243.87) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

The output of sudo apt-cache policy libc6

libc6:
  Installed: 2.31-0ubuntu9.2
  Candidate: 2.31-0ubuntu9.2
  Version table:
 *** 2.31-0ubuntu9.2 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.31-0ubuntu9 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages

Solution 1:

You have to revert libc6 library to the normal version using command below:

sudo apt-get install libc6=2.31-0ubuntu9.2 libc6:i386=2.31-0ubuntu9.2