How To Install libgpiod on CentOS 8

In this tutorial we learn how to install libgpiod on CentOS 8. libgpiod is C library and tools for interacting with linux GPIO char device

Introduction

In this tutorial we learn how to install libgpiod on CentOS 8.

What is libgpiod

libgpiod is a C library and tools for interacting with the linux GPIO character device (gpiod stands for GPIO device) The new character device interface guarantees all allocated resources are freed after closing the device file descriptor and adds several new features that are not present in the obsolete sysfs interface (like event polling, setting/reading multiple values at once or open-source and open-drain GPIOs).

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

Install libgpiod on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install libgpiod

Install libgpiod on CentOS 8 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install libgpiod

How To Uninstall libgpiod on CentOS 8

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

sudo dnf remove libgpiod

References

Summary

In this tutorial we learn how to install libgpiod on CentOS 8 using yum and dnf.