I just installed Haskell from it's official site. After that, following it's quick-start tutorial.
I run:
cabal update
Which shows this message:
Downloading the latest package list from hackage.haskell.org Note: there is a new version of cabal-install available. To upgrade, run: cabal install cabal-install
I run:
cabal install cabal-install
and check if the update was successful with
cabal update
The result, it shows me the same message from the start:
Downloading the latest package list from hackage.haskell.org Note: there is a new version of cabal-install available. To upgrade, run: cabal install cabal-install
So, did I upgrade the cabal-install or not? How do I check my cabal's version?
Important: I'm using the 64 bits version for Mac OS X.
Using Cabal By default stack installs packages to ~/. cabal and ~/. ghc in your home directory.
In my case (and probably others?) cabal is initially installed in /usr/local/bin
by homebrew when installing haskell-platform
. When upgrading cabal, the version is installed to $HOME/.cabal/bin/cabal
. You ought to place your cabal bins higher in your $PATH
, like so:
export PATH=$HOME/.cabal/bin:$PATH
I had a similar issue after installing the Haskell platform 2012.4.0.0
on OSX. When I ran cabal install cabal-install
, it ended with:
cabal: ../ghc-7.4.2/lib/cabal-install-1.16.0.2/bin/cabal: does not exist
So I guessed it got its paths mixed up somewhere. However the executable was actually built successfully (check for ~/Library/Haskell/ghc-7.4.2/lib/cabal-install-1.16.0.2/bin/cabal
) and I just copied it from there to ~/Library/Haskell/bin
which is on my path.
Thereafter everything ran OK:
$ which cabal /Users/luke/Library/Haskell/bin/cabal $ cabal update Downloading the latest package list from hackage.haskell.org $ cabal --version cabal-install version 1.16.0.2 using version 1.16.0.3 of the Cabal library
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With