How To Install tcc on Debian 10

Learn how to install tcc on Debian 10 with this tutorial. tcc is small ANSI C compiler

Introduction

In this tutorial we learn how to install tcc on Debian 10.

What is tcc

tcc is:

TCC (for Tiny C Compiler) is a small and fast ANSI C compiler. It generates optimized x86 code, and can compile, assemble, and link several times faster than ‘gcc -O0’. Any C dynamic library can be used directly. It includes an optional memory and bounds checker, and bounds-checked code can be mixed freely with standard code. C script is also supported via the usual hash-bang mechanism.

NOTE: TCC is still somewhat experimental and is not recommended for production use. The code it generates is much less optimized than what GCC produces, and compiler bugs can have serious security consequences for your program.

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

Install tcc Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install tcc

Install tcc Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install tcc using apt by running the following command:

sudo apt -y install tcc

Install tcc 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 tcc using aptitude by running the following command:

sudo aptitude -y install tcc

How To Uninstall tcc on Debian 10

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

sudo apt-get remove tcc

Uninstall tcc And Its Dependencies

To uninstall tcc and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove tcc

Remove tcc Configurations and Data

To remove tcc configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge tcc

Remove tcc configuration, data, and all of its dependencies

We can use the following command to remove tcc configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge tcc

Dependencies

tcc have the following dependencies:

References

Summary

In this tutorial we learn how to install tcc package on Debian 10 using different package management tools: apt, apt-get and aptitude.