How To Install libclang-rt-dev on Debian 12

Learn how to install libclang-rt-dev on Debian 12 with this tutorial. libclang-rt-dev is Compiler-rt - Development package

Introduction

In this tutorial we learn how to install libclang-rt-dev on Debian 12.

What is libclang-rt-dev

libclang-rt-dev is:

This package provides various libraries:

  • builtins - Simple libraries that provide implementation of the low-level target-specific hooks required by code generation and other runtime components.
  • sanitizer runtimes - AddressSanitizer, ThreadSanitizer, UndefinedBehaviorSanitizer, MemorySanitizer, LeakSanitizer DataFlowSanitizer, etc
  • profile - Library which is used to collect coverage information.

This is a dependency package providing the default compiler-rt libraries and headers.

There are three methods to install libclang-rt-dev on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libclang-rt-dev Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libclang-rt-dev using apt-get by running the following command:

sudo apt-get -y install libclang-rt-dev

Install libclang-rt-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libclang-rt-dev using apt by running the following command:

sudo apt -y install libclang-rt-dev

Install libclang-rt-dev Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libclang-rt-dev using aptitude by running the following command:

sudo aptitude -y install libclang-rt-dev

How To Uninstall libclang-rt-dev on Debian 12

To uninstall only the libclang-rt-dev package we can use the following command:

sudo apt-get remove libclang-rt-dev

Uninstall libclang-rt-dev And Its Dependencies

To uninstall libclang-rt-dev and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove libclang-rt-dev

Remove libclang-rt-dev Configurations and Data

To remove libclang-rt-dev configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge libclang-rt-dev

Remove libclang-rt-dev configuration, data, and all of its dependencies

We can use the following command to remove libclang-rt-dev configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libclang-rt-dev

Dependencies

libclang-rt-dev have the following dependencies:

References

Summary

In this tutorial we learn how to install libclang-rt-dev package on Debian 12 using different package management tools: apt, apt-get and aptitude.