Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Have I upgraded my cabal-install?

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.

like image 547
Luis Ortega Araneda Avatar asked Feb 17 '13 05:02

Luis Ortega Araneda


People also ask

Where are Cabal packages installed?

Using Cabal By default stack installs packages to ~/. cabal and ~/. ghc in your home directory.


2 Answers

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 
like image 109
Charles Avatar answered Oct 01 '22 03:10

Charles


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 
like image 20
Shaun the Sheep Avatar answered Oct 01 '22 02:10

Shaun the Sheep