How To Install cabal-helper on Debian 9

In this tutorial we learn how to install cabal-helper on Debian 9. cabal-helper is simple interface to some of Cabals configuration state

Introduction

In this tutorial we learn how to install cabal-helper on Debian 9.

What is cabal-helper

cabal-helper is:

cabal-helper provides a library which wraps the internal use of an executable to lift the restrictions imposed by linking against versions of GHC before 7.10. This has the pleasant side effect of isolating the user from having to deal with Cabal version changes manually as cabal-helper can simply recompile it’s helper program automatically as needed.

cabal-helper uses a wrapper executable to compile the actual cabal-helper executable at runtime while linking against an arbitrary version of Cabal. This runtime-compiled helper executable is then used to extract various bits and peices from Cabal’s on disk state (dist/setup-config) written by it’s configure command.

In addition to this the wrapper executable also supports installing any version of Cabal from hackage in case it cannot be found in any available package database. The wrapper installs these instances of the Cabal library into a private package database so as to not interfere with the user’s packages.

Furthermore the wrapper supports one special case namely reading a state file for Cabal itself. This is needed as Cabal compiles it’s Setup.hs using itself and not using any version of Cabal installed in any package database.

There are three methods to install cabal-helper on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install cabal-helper Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install cabal-helper using apt-get by running the following command:

sudo apt-get -y install cabal-helper

Install cabal-helper Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install cabal-helper

Install cabal-helper Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install cabal-helper using aptitude by running the following command:

sudo aptitude -y install cabal-helper

How To Uninstall cabal-helper on Debian 9

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

sudo apt-get remove cabal-helper

Uninstall cabal-helper And Its Dependencies

To uninstall cabal-helper and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove cabal-helper

Remove cabal-helper Configurations and Data

To remove cabal-helper configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge cabal-helper

Remove cabal-helper configuration, data, and all of its dependencies

We can use the following command to remove cabal-helper configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge cabal-helper

Dependencies

cabal-helper have the following dependencies:

References

Summary

In this tutorial we learn how to install cabal-helper package on Debian 9 using different package management tools: apt, apt-get and aptitude.