How To Install cpp on AlmaLinux 8
Introduction
In this tutorial we learn how to install cpp
on AlmaLinux 8.
What is cpp
Cpp is the GNU C-Compatible Compiler Preprocessor. Cpp is a macro processor which is used automatically by the C compiler to transform your program before actual compilation. It is called a macro processor because it allows you to define macros, abbreviations for longer constructs. The C preprocessor provides four separate functionalities inclusion of header files (files of declarations that can be substituted into your program); macro expansion (you can define macros, and the C preprocessor will replace the macros with their definitions throughout the program); conditional compilation (using special preprocessing directives, you can include or exclude parts of the program according to various conditions); and line control (if you use a program to combine or rearrange source files into an intermediate file which is then compiled, you can use line control to inform the compiler about where each source line originated). You should install this package if you are a C programmer and you use macros.
We can use yum
or dnf
to install cpp
on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install cpp.
Install cpp on AlmaLinux 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install cpp
using dnf
by running the following command:
sudo dnf -y install cpp
Install cpp on AlmaLinux 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
After updating yum database, We can install cpp
using yum
by running the following command:
sudo yum -y install cpp
How To Uninstall cpp on AlmaLinux 8
To uninstall only the cpp
package we can use the following command:
sudo dnf remove cpp
References
Summary
In this tutorial we learn how to install cpp
on AlmaLinux 8 using yum and dnf.