Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
README.md 5.36 KiB

The cabal-install package

See the Cabal web site for more information.

The cabal-install package provides a command line tool named cabal. It uses the Cabal library and provides a user interface to the Cabal/Hackage build automation and package management system. It can build and install both local and remote packages, including dependencies.

Installing the cabal command-line tool

The cabal-install package requires a number of other packages, most of which come with a standard GHC installation. It requires the network package, which is sometimes packaged separately by Linux distributions; for example, on Debian or Ubuntu, it is located in the "libghc6-network-dev" package.

cabal requires a few other Haskell packages that are not always installed. The exact list is specified in the .cabal file or in the bootstrap.sh file. All these packages are available from Hackage.

Note that on some Unix systems you may need to install an additional zlib development package using your system package manager; for example, on Debian or Ubuntu, it is located in the "zlib1g-dev" package; on Fedora, it is located in the "zlib-devel" package. It is required because the Haskell zlib package uses the system zlib C library and header files.

The cabal-install package is now part of the Haskell Platform, so you do not usually need to install it separately. However, if you are starting from a minimal GHC installation, you need to install cabal-install manually. Since it is an ordinary Cabal package, cabal-install can be built the standard way; to facilitate this, the process has been partially automated. It is described below.

Quick start on Unix-like systems

As a convenience for users on Unix-like systems, there is a bootstrap.sh script that will download and install each of cabal-install's dependencies in turn.