Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
704 views
in Technique[技术] by (71.8m points)

macos - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...