Skip to content

Instantly share code, notes, and snippets.

@mbs0221
Last active December 29, 2023 07:03
Show Gist options
  • Save mbs0221/68e2a2f6922be716304c967ef6058623 to your computer and use it in GitHub Desktop.
Save mbs0221/68e2a2f6922be716304c967ef6058623 to your computer and use it in GitHub Desktop.
update-alternatives
sudo apt install gcc-11 g++-11 gcc-12 g++-12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
sudo apt install -y bpftrace gcc-10-plugin-dev gettext
sudo apt install gcc-10 gcc-11 gcc-12
sudo apt install clang-11 clang-12 clang-13 clang-14 clang-15
sudo apt install clang++-11 clang++-12 clang++-13 clang++-14 clang++-15
sudo apt install llvm-11 llvm-12 llvm-13 llvm-14 llvm-15
sudo apt install axel wget curl net-tools trace-cmd
# clang
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-11 11
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 12
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 13
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 14
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 15
# clang++
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-11 11
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 12
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-13 13
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 14
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 15
# llvm-config
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-11 11
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-12 12
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-13 13
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-14 14
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-15 15
# opt
sudo update-alternatives --install /usr/bin/opt opt /usr/bin/opt-11 11
sudo update-alternatives --install /usr/bin/opt opt /usr/bin/opt-12 12
sudo update-alternatives --install /usr/bin/opt opt /usr/bin/opt-13 13
sudo update-alternatives --install /usr/bin/opt opt /usr/bin/opt-14 14
sudo update-alternatives --install /usr/bin/opt opt /usr/bin/opt-15 15
sudo update-alternatives --config gcc g++ clang clang++ llvm-config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment