How To Install perl-DBI on CentOS 7

In this tutorial we learn how to install perl-DBI on CentOS 7. perl-DBI is A database access API for perl

Introduction

In this tutorial we learn how to install perl-DBI on CentOS 7.

What is perl-DBI

DBI is a database access Application Programming Interface (API) for the Perl Language. The DBI API Specification defines a set of functions, variables and conventions that provide a consistent database interface independent of the actual database being used.

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

Install perl-DBI on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install perl-DBI using yum by running the following command:

sudo yum -y install perl-DBI

Install perl-DBI on CentOS 7 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 perl-DBI using dnf by running the following command:

sudo dnf -y install perl-DBI

How To Uninstall perl-DBI on CentOS 7

To uninstall only the perl-DBI package we can use the following command:

sudo dnf remove perl-DBI

References

Summary

In this tutorial we learn how to install perl-DBI on CentOS 7 using yum and dnf.