How To Install cabal-dev on CentOS 7

In this tutorial we learn how to install cabal-dev on CentOS 7. cabal-dev is Manage sandboxed Haskell build environments

Introduction

In this tutorial we learn how to install cabal-dev on CentOS 7.

What is cabal-dev

cabal-dev is a tool for managing development builds of Haskell projects. It supports maintaining sandboxed cabal-install repositories, and sandboxed ghc package databases. By default, it uses a cabal-dev directory under the current working directory as the sandbox. For most packages, just use cabal-dev instead of cabal, and you will get a sandboxed build that will not install anything (even automatically installed dependencies) into the user or global ghc package databases. If your build depends on patched or unreleased libraries, you can add them to your sandboxed build environment.

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

Install cabal-dev on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install cabal-dev

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

sudo dnf -y install cabal-dev

How To Uninstall cabal-dev on CentOS 7

To uninstall only the cabal-dev package we can use the following command:

sudo dnf remove cabal-dev

References

Summary

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