![]() ![]() This answer has been rewritten since the downvote, and is the most-up-to-date answer to this question as of Apr. ![]() Then, you can install which version you want to install such as Then you should search clang-format with below command first The list of packages are deb saucy main restricted universe multiverseĭeb-src saucy main restricted universe multiverseĭeb saucy-security main restricted universe multiverseĭeb saucy-updates main restricted universe multiverseĭeb saucy-proposed main restricted universe multiverseĭeb saucy-backports main restricted universe multiverseĭeb-src saucy-security main restricted universe multiverseĭeb-src saucy-updates main restricted universe multiverseĭeb-src saucy-proposed main restricted universe multiverseĭeb-src saucy-backports main restricted universe multiverse Actually below list is generated for the singapore servers but if you want to look for your own country you can use Īfter generating your list, you have to add them into your repository, you can learn how to do that by looking to here. In order to find this package with the apt-cache we have to add below list into our repository list. You can install multiple versions of clang-format in a same environment. Then you can use -version to check the installed clang-format. ![]() Step 5: Use apt install to install the clang-format you want. You can check if your operating system is not on this list. Jammy (Ubuntu 22.04) deb llvm-toolchain-jammy main Xenial (Ubuntu 16.04): deb llvm-toolchain-xenial mainīionic (Ubuntu 18.04): deb llvm-toolchain-bionic mainįocal (Ubuntu 20.04) deb llvm-toolchain-focal main Step 2: Append the following content at the end of /etc/apt/sources.list based on your operating system:īuster (Debian 10): deb llvm-toolchain-buster mainīullseye (Debian 11): deb llvm-toolchain-bullseye main Step 1: Run wget -O - |sudo apt-key add. You can install the latest version of clang-format by following the steps below: For example, the latest version of clang-format from Ubuntu 18.04 is v7 but the latest stable version is already reached v12. However, the clang-format provided by Debian/Ubuntu is quite old. Nowadays, you can directly use apt install clang-format in Debian/Ubuntu to install clang-format. ![]()
0 Comments
Leave a Reply. |