How To Install ghc-zlib on CentOS 7

In this tutorial we learn how to install ghc-zlib on CentOS 7. ghc-zlib is Compression and decompression in the gzip and zlib formats

Introduction

In this tutorial we learn how to install ghc-zlib on CentOS 7.

What is ghc-zlib

This package provides a pure interface for compressing and decompressing streams of data represented as lazy ‘ByteString’s. It uses the zlib C library so it has high performance. It supports the zlib, gzip and raw compression formats. It provides a convenient high level API suitable for most tasks and for the few cases where more control is needed it provides access to the full zlib feature set.

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

Install ghc-zlib on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install ghc-zlib

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

sudo dnf -y install ghc-zlib

How To Uninstall ghc-zlib on CentOS 7

To uninstall only the ghc-zlib package we can use the following command:

sudo dnf remove ghc-zlib

References

Summary

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