6

I want to run this program hosted on Cabal, the official repository of Haskell apps.

First I installed Cabal:

sudo apt-get install cabal-install
cabal update

Second I installed the program itself:

$ cabal install clanki
Resolving dependencies...
Downloading safe-0.3.9...
Downloading strict-0.3.2...
Configuring strict-0.3.2...
Configuring safe-0.3.9...
Building safe-0.3.9...
Building strict-0.3.2...
Installed strict-0.3.2
Installed safe-0.3.9
Downloading clanki-1.2.6...
Configuring clanki-1.2.6...
Building clanki-1.2.6...
Installed clanki-1.2.6

Third I tried to run the program:

$ clanki --list
clanki: command not found

Why is the program not found, despite using the recommended installation procedure?

Nicolas Raoul
  • 11,921

1 Answers1

6

cabal installs to ~/.cabal, with the binaries going in ~/.cabal/bin. You have to add this path to your PATH:

export PATH="$HOME/.cabal/bin:$PATH"

The Haskell website says cabal can add symlinks to ~/bin (which gets automatically added to PATH):

If you decided not to put this directory on your $PATH then you can get cabal to symlink binaries into another directory, eg ~/bin. To use this feature edit ~/.cabal/config and see the symlink-bindir field. Note that the ~/.cabal/config file is not created until you run a cabal command for the first time, eg cabal update.

muru
  • 207,228