0

If I have a clean OS image (in my case created with multipass) and I want to install a c-compiler, why is it not set as default after installing?

$ sudo apt install clang-15
...
$ cc
cc: command not found

What do I need to do, so that /etc/alternatives/cc exists? Surely I am not expected to create a symlink manually?

$ update-alternatives --list cc
update-alternatives: error: no alternatives for cc

Shouldn't clang-15 show up in here?

UPDATE

$ sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-15 60
$ sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-15 60
Bram
  • 2,169
  • 24
  • 42
  • Read all the answers to the question. Better set a link in your ~/bin or .local/bin than pull the rug from under a system update expecting a specific compiler. – ubfan1 Nov 17 '22 at 22:26

0 Answers0