How To Install glibc-static on Rocky Linux 8

In this tutorial we learn how to install glibc-static on Rocky Linux 8. glibc-static is C library static libraries for -static linking.

Introduction

In this tutorial we learn how to install glibc-static on Rocky Linux 8.

What is glibc-static

The glibc-static package contains the C library static libraries for -static linking. You don’t need these, unless you link statically, which is highly discouraged.

We can use yum or dnf to install glibc-static on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install glibc-static.

Install glibc-static on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install glibc-static

Install glibc-static on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install glibc-static

How To Uninstall glibc-static on Rocky Linux 8

To uninstall only the glibc-static package we can use the following command:

sudo dnf remove glibc-static

glibc-static Package Contents on Rocky Linux 8

/usr/lib/libBrokenLocale.a
/usr/lib/libanl.a
/usr/lib/libc.a
/usr/lib/libdl.a
/usr/lib/libm.a
/usr/lib/libpthread.a
/usr/lib/libresolv.a
/usr/lib/librt.a
/usr/lib/libutil.a
/usr/lib64/libBrokenLocale.a
/usr/lib64/libanl.a
/usr/lib64/libc.a
/usr/lib64/libdl.a
/usr/lib64/libm-2.28.a
/usr/lib64/libm.a
/usr/lib64/libmvec.a
/usr/lib64/libpthread.a
/usr/lib64/libresolv.a
/usr/lib64/librt.a
/usr/lib64/libutil.a

References

Summary

In this tutorial we learn how to install glibc-static on Rocky Linux 8 using yum and dnf.