How To Install gd on AlmaLinux 8

In this tutorial we learn how to install gd in AlmaLinux 8. gd is A graphics library for quick creation of PNG or JPEG images

Introduction

In this tutorial we learn how to install gd on AlmaLinux 8.

What is gd

The gd graphics library allows your code to quickly draw images complete with lines, arcs, text, multiple colors, cut and paste from other images, and flood fills, and to write out the result as a PNG or JPEG file. This is particularly useful in Web applications, where PNG and JPEG are two of the formats accepted for inline images by most browsers. Note that gd is not a paint program.

We can use yum or dnf to install gd on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install gd.

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

sudo dnf -y install gd

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

sudo yum -y install gd

How To Uninstall gd on AlmaLinux 8

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

sudo dnf remove gd

References

Summary

In this tutorial we learn how to install gd on AlmaLinux 8 using yum and dnf.