How To Install ghc-xdg-basedir on CentOS 7

In this tutorial we learn how to install ghc-xdg-basedir on CentOS 7. ghc-xdg-basedir is Haskell implementation of XDG base directory spec

Introduction

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

What is ghc-xdg-basedir

A basic implementation of the XDG Base Directory specification. On Unix platforms, this should be a very straightforward implementation of the XDG Base Directory spec. On Windows, it will attempt to do the right thing with regards to choosing appropriate directories.

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

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

sudo yum -y install ghc-xdg-basedir

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

sudo dnf -y install ghc-xdg-basedir

How To Uninstall ghc-xdg-basedir on CentOS 7

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

sudo dnf remove ghc-xdg-basedir

References

Summary

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