How To Install mpfr on CentOS 8

mpfr is A C library for multiple-precision floating-point computations A C library for multiple-precision floating-point computations

Introduction

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

What is mpfr

The MPFR library is a C library for multiple-precision floating-point computations with “correct rounding”. The MPFR is efficient and also has a well-defined semantics. It copies the good ideas from the ANSI/IEEE-754 standard for double-precision floating-point arithmetic (53-bit mantissa). MPFR is based on the GMP multiple-precision library. mpfr 3.1.6 1.el8 i686 230 k mpfr-3.1.6-1.el8.src.rpm baseos A C library for multiple-precision floating-point computations http LGPLv3+ and GPLv3+ and GFDL The MPFR library is a C library for multiple-precision floating-point computations with “correct rounding”. The MPFR is efficient and also has a well-defined semantics. It copies the good ideas from the ANSI/IEEE-754 standard for double-precision floating-point arithmetic (53-bit mantissa). MPFR is based on the GMP multiple-precision library.

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

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

sudo dnf -y install mpfr

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

sudo yum -y install mpfr

How To Uninstall mpfr on CentOS 8

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

sudo dnf remove mpfr

mpfr Package Contents on CentOS 8

/usr/lib/.build-id
/usr/lib/.build-id/86
/usr/lib/.build-id/86/a54225590697a85c95d7aec38fa8026fda3dc9
/usr/lib64/libmpfr.so.4
/usr/lib64/libmpfr.so.4.1.6
/usr/share/doc/mpfr
/usr/share/doc/mpfr/AUTHORS
/usr/share/doc/mpfr/BUGS
/usr/share/doc/mpfr/FAQ.html
/usr/share/doc/mpfr/NEWS
/usr/share/doc/mpfr/README
/usr/share/doc/mpfr/TODO
/usr/share/licenses/mpfr
/usr/share/licenses/mpfr/COPYING
/usr/share/licenses/mpfr/COPYING.LESSER
/usr/lib/.build-id
/usr/lib/.build-id/b1
/usr/lib/.build-id/b1/51560b38b87c48d1883a8c912ee07b2ee01c29
/usr/lib/libmpfr.so.4
/usr/lib/libmpfr.so.4.1.6
/usr/share/doc/mpfr
/usr/share/doc/mpfr/AUTHORS
/usr/share/doc/mpfr/BUGS
/usr/share/doc/mpfr/FAQ.html
/usr/share/doc/mpfr/NEWS
/usr/share/doc/mpfr/README
/usr/share/doc/mpfr/TODO
/usr/share/licenses/mpfr
/usr/share/licenses/mpfr/COPYING
/usr/share/licenses/mpfr/COPYING.LESSER

References

Summary

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