Skip to main content

Command Palette

Search for a command to run...

Update LLVM from 18 to 21 In Ubuntu 24

Updated
1 min read

Here’s I do it, first install the llvm 21:

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

Then install all LLVM tools

sudo apt install llvm-21* clang-21* lld-21* lldb-21*

Then install the alternatives (see the script)

wget https://raw.githubusercontent.com/ShangjinTang/dotfiles/05ef87daae29475244c276db5d406b58c52be445/linux/ubuntu/22.04/bin/update-alternatives-clang
sudo bash ./update-alternatives-clang
680 views