{"slug": "install-clang-5-0", "title": "Install Clang 5.0", "summary": "The article provides a step-by-step command-line guide for installing Clang 5.0 and related LLVM tools on Ubuntu 16.04 (Xenial). It includes commands to add the LLVM repository, install the compiler and debugging tools, and set Clang as the default system compiler using update-alternatives. The guide also suggests installing additional development tools like build-essential, CMake, and optionally the Code::Blocks IDE.", "body_md": "gistfile1.txt\n\n      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\n      \nLearn more about bidirectional Unicode characters\n\n \n    Show hidden characters\n\nsudo add-apt-repository \"deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main\"\n\nwget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -\n\nsudo apt update\n\nsudo apt install python-lldb-5.0\n\nsudo apt install clang-5.0 clang-5.0-doc libclang-common-5.0-dev libclang-5.0-dev libclang1-5.0 libclang1-5.0-dbg libllvm-5.0-ocaml-dev libllvm5.0 libllvm5.0-dbg lldb-5.0 llvm-5.0 llvm-5.0-dev llvm-5.0-doc llvm-5.0-examples llvm-5.0-runtime clang-format-5.0 python-clang-5.0 libfuzzer-5.0-dev\n\nsudo ln -sf /usr/bin/llvm-symbolizer-5.0 /usr/bin/llvm-symbolizer\n\nsudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-5.0 60\n\nsudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 50\n\nsudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-5.0 60\n\nsudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 50\n\nsudo apt install build-essential cmake valgrind kcachegrind vim cccc\n\n# OPTIONAL: Code::Blocks IDE\n\nsudo apt install codeblocks codeblocks-contrib\n\n# You can follow the guide from https://mousepawmedia.net/help/tools/cpp.html#trimming-down-on-plugins onward to configure C::B", "url": "https://wpnews.pro/news/install-clang-5-0", "canonical_source": "https://gist.github.com/CodeMouse92/db4853223585940f1bd143debab0c87e", "published_at": "2017-12-21 21:51:30+00:00", "updated_at": "2026-05-22 20:08:59.120012+00:00", "lang": "en", "topics": ["developer-tools", "open-source"], "entities": ["Clang", "LLVM", "Ubuntu", "Code::Blocks"], "alternates": {"html": "https://wpnews.pro/news/install-clang-5-0", "markdown": "https://wpnews.pro/news/install-clang-5-0.md", "text": "https://wpnews.pro/news/install-clang-5-0.txt", "jsonld": "https://wpnews.pro/news/install-clang-5-0.jsonld"}}