1

04, I tried installing clang using the following command

`sudo apt install clang`

however getting the following error

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-3.8 (>= 3.8~) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

any help would be much appreciated.

Ankit Kumar
  • 121
  • 6
  • 1. Did you add any external PPA for clang? 2. Retry after running `sudo apt update` – Archisman Panigrahi Oct 21 '22 at 21:33
  • @ArchismanPanigrahi I am still getting the same error – Ankit Kumar Oct 21 '22 at 21:38
  • According to https://packages.ubuntu.com/focal/clang, in Ubuntu 20.04, it is supposed to install clang-10. Did you somehow install any PPA for clang? An workaround would be to run `sudo apt install clang-10` – Archisman Panigrahi Oct 21 '22 at 21:43
  • @ArchismanPanigrahi No, I did not install any PPA for clang, I am new to development and learning, please guide me through this. I tried looking for clang-10 at launchpad however there is only upto 3.6 version. Thank you – Ankit Kumar Oct 24 '22 at 12:38
  • Did you run the command I posted to install clang-10? – Archisman Panigrahi Oct 24 '22 at 13:21
  • Hi @ArchismanPanigrahi , I did that but I am getting the following error `Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package clang-10 ` – Ankit Kumar Oct 25 '22 at 12:48
  • 2
    Does this answer your question? [How do I restore the default repositories?](https://askubuntu.com/questions/124017/how-do-i-restore-the-default-repositories) – nobody Oct 25 '22 at 12:52

0 Answers0