How To Install clang on Fedora 34

clang is A C language family front-end for LLVM A C language family front-end for LLVM

Introduction

In this tutorial we learn how to install clang on Fedora 34.

What is clang

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. clang 12.0.0 2.fc34 x86_64 83 k clang-12.0.0-2.fc34.src.rpm updates A C language family front-end for LLVM http NCSA 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 or dnf to install clang on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install clang.

Install clang on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo dnf -y install clang

Install clang on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo yum -y install clang

How To Uninstall clang on Fedora 34

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

sudo dnf remove clang

clang Package Contents on Fedora 34

/usr/bin/clang
/usr/bin/clang++
/usr/bin/clang++-12
/usr/bin/clang-12
/usr/bin/clang-cl
/usr/bin/clang-cpp
/usr/lib/.build-id
/usr/lib/.build-id/08
/usr/lib/.build-id/08/3a59bcebc56fd6f59b1d9127a2a6db644ff59b
/usr/share/licenses/clang
/usr/share/licenses/clang/LICENSE.TXT
/usr/share/man/man1/clang++-12.1.gz
/usr/share/man/man1/clang++.1.gz
/usr/share/man/man1/clang-12.1.gz
/usr/share/man/man1/clang.1.gz
/usr/bin/clang
/usr/bin/clang++
/usr/bin/clang++-12
/usr/bin/clang-12
/usr/bin/clang-cl
/usr/bin/clang-cpp
/usr/lib/.build-id
/usr/lib/.build-id/ae
/usr/lib/.build-id/ae/f323f8f0e0005eb680c8075069ab8d3ef9a26e
/usr/share/licenses/clang
/usr/share/licenses/clang/LICENSE.TXT
/usr/share/man/man1/clang++-12.1.gz
/usr/share/man/man1/clang++.1.gz
/usr/share/man/man1/clang-12.1.gz
/usr/share/man/man1/clang.1.gz
/usr/bin/clang
/usr/bin/clang++
/usr/bin/clang++-12
/usr/bin/clang-12
/usr/bin/clang-cl
/usr/bin/clang-cpp
/usr/lib/.build-id
/usr/lib/.build-id/e6
/usr/lib/.build-id/e6/632d07b5bee3ac9b0a3f76c46d43d8894fdc99
/usr/share/licenses/clang
/usr/share/licenses/clang/LICENSE.TXT
/usr/share/man/man1/clang++-12.1.gz
/usr/share/man/man1/clang++.1.gz
/usr/share/man/man1/clang-12.1.gz
/usr/share/man/man1/clang.1.gz
/usr/bin/clang
/usr/bin/clang++
/usr/bin/clang++-12
/usr/bin/clang-12
/usr/bin/clang-cl
/usr/bin/clang-cpp
/usr/lib/.build-id
/usr/lib/.build-id/fa
/usr/lib/.build-id/fa/ee057a1c4ddcd1d7565fa8e390ca23f4db8eeb
/usr/share/licenses/clang
/usr/share/licenses/clang/LICENSE.TXT
/usr/share/man/man1/clang++-12.1.gz
/usr/share/man/man1/clang++.1.gz
/usr/share/man/man1/clang-12.1.gz
/usr/share/man/man1/clang.1.gz

References

Summary

In this tutorial we learn how to install clang on Fedora 34 using yum and dnf.