How To Install clang.x86_64 on Amazon Linux 2

In this tutorial we learn how to install clang.x86_64 in Amazon Linux 2. clang.x86_64 is A C language family front-end for LLVM

Introduction

In this tutorial we learn how to install clang.x86_64 on Amazon Linux 2.

What is clang.x86_64

clang 1. A loud, resonant, metallic sound. 2. The strident call of a crane or goose. 3. C-language family front-end toolkit. The goal of the Clang project is to create a new C, C++, Objective C and Objective C++ front-end for the LLVM compiler. Its tools are built as libraries and designed to be loosely-coupled and extensible. Install compiler-rt if you want the Blocks C language extension or to enable sanitization and profiling options when building, and libomp-devel to enable -fopenmp.

We can use yum to install clang.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install clang.x86_64.

Install clang.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install clang.x86_64 using yum by running the following command:

sudo yum -y install clang.x86_64

How To Uninstall clang.x86_64 on Amazon Linux 2

To uninstall only the clang.x86_64 package we can use the following command:

sudo yum remove clang.x86_64

clang.x86_64 Package Contents on Amazon Linux 2

/usr/bin/clang
/usr/bin/clang++
/usr/bin/clang++-11
/usr/bin/clang-11
/usr/bin/clang-cl
/usr/bin/clang-cpp
/usr/share/licenses/clang-11.1.0
/usr/share/licenses/clang-11.1.0/LICENSE.TXT
/usr/share/man/man1/clang++-11.1.gz
/usr/share/man/man1/clang++.1.gz
/usr/share/man/man1/clang-11.1.gz
/usr/share/man/man1/clang.1.gz

References

Summary

In this tutorial we learn how to install clang.x86_64 on Amazon Linux 2 using yum.