How To Install pcre on CentOS 8

pcre is Perl-compatible regular expression library Perl-compatible regular expression library

Introduction

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

What is pcre

PCRE, Perl-compatible regular expression, library has its own native API, but a set of wrapper functions that are based on the POSIX API are also supplied in the libpcreposix library. Note that this just provides a POSIX calling interface to PCRE and semantics. This package provides support for strings in 8-bit and UTF-8 encodings. Detailed change log is provided by pcre-doc package. pcre 8.42 4.el8 i686 208 k pcre-8.42-4.el8.src.rpm baseos Perl-compatible regular expression library http BSD PCRE, Perl-compatible regular expression, library has its own native API, but a set of wrapper functions that are based on the POSIX API are also supplied in the libpcreposix library. Note that this just provides a POSIX calling interface to PCRE and semantics. This package provides support for strings in 8-bit and UTF-8 encodings. Detailed change log is provided by pcre-doc package.

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

Install pcre on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo dnf -y install pcre

Install pcre on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo yum -y install pcre

How To Uninstall pcre on CentOS 8

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

sudo dnf remove pcre

pcre Package Contents on CentOS 8

/usr/lib/.build-id
/usr/lib/.build-id/22
/usr/lib/.build-id/22/03234c40ccfd77ea2bbee7ba4772e7db89c565
/usr/lib/.build-id/c0
/usr/lib/.build-id/c0/ea2c9d06cb57414b681dec7d0b8ae8a89c6589
/usr/lib64/libpcre.so.1
/usr/lib64/libpcre.so.1.2.10
/usr/lib64/libpcreposix.so.0
/usr/lib64/libpcreposix.so.0.0.6
/usr/share/doc/pcre
/usr/share/doc/pcre/AUTHORS
/usr/share/doc/pcre/NEWS
/usr/share/licenses/pcre
/usr/share/licenses/pcre/COPYING
/usr/share/licenses/pcre/LICENCE
/usr/lib/.build-id
/usr/lib/.build-id/5e
/usr/lib/.build-id/5e/6fdc1959a18d202acf8013fb1068b3d9c35034
/usr/lib/.build-id/ce
/usr/lib/.build-id/ce/8d589f1b1150b4cf4daa34d91fb5095ec744eb
/usr/lib/libpcre.so.1
/usr/lib/libpcre.so.1.2.10
/usr/lib/libpcreposix.so.0
/usr/lib/libpcreposix.so.0.0.6
/usr/share/doc/pcre
/usr/share/doc/pcre/AUTHORS
/usr/share/doc/pcre/NEWS
/usr/share/licenses/pcre
/usr/share/licenses/pcre/COPYING
/usr/share/licenses/pcre/LICENCE

References

Summary

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