Barzi2001
Barzi2001

Reputation: 1766

Switch to llvm-13 as default (instead of llvm-10) in Ubuntu 20.04. How?

I have installed both llvm-10.0.0 and llvm-13.0.0 on an Ubuntu 20.04 machine. Typing e.g. clang --version or clangd --version always returns the 10.0.0 versions. I want to use the 13.0.0 version as defualt. How should I do?

Upvotes: 0

Views: 7005

Answers (1)

navylover
navylover

Reputation: 13539

You can use alternatives to change the default version:

sudo update-alternatives --install \
        /usr/bin/llvm-config       llvm-config      /usr/bin/llvm-config-13.0.0  200 
......

Total example is here.

Upvotes: 2

Related Questions