Search code examples
haskellghccabalosx-elcapitan

Haskell and Cabal missing after El Capitan update


Following an upgrade to OS X El Capitan, Cabal and GHC are no longer found on my system:

-bash: ghc: command not found
-bash: cabal: command not found

What do I need to do to get Cabal and GHC working on OS X El Capitan?


Solution

  • I've found the following approach most reliable on all versions of OSX including El Capitan.

    1. Install Homebrew

    2. Run brew install ghc

    3. Run brew install cabal-install

    This approach allows you to easily install the latest versions and have multiple versions installed and easily switch between them using the brew switch command. Haskell Platform lacks these properties, which is why the advanced users tend to avoid it any way.