Install the Haskell Platform from http://hackage.haskell.org/platform/mac.html. The version provided by Macports is too old to work with current versions of git-annex. Then execute
sudo port install git-core ossp-uuid md5sha1sum coreutils pcre sudo ln -s /opt/local/include/pcre.h /usr/include/pcre.h # This is hack that allows pcre-light to find pcre sudo cabal update cabal install git-annex --bindir=$HOME/bin
See also:
You can also use Homebrew instead of MacPorts. Homebrew's
haskell-platform
is up-to-date, too:As of this writing, however, Homebrew's
md5sha1sum
has a broken mirror. I wound up getting that from MacPorts anyway.The Haskell Platform installer for OSX uses GHC 7.0.4, which doesn't seem able to support the current version of git-annex.
Cabal throws a very cryptic error about not being able to use the proper base package.
I was able to install it by
(Note I also tried this with homebrew and had similar results)
I got the following error message trying to install git-annex:
These are the steps I performed to make it work
sudo cabal install git-annex --bindir=$HOME/bin
.sudo cabal install git-annex --bindir=$HOME/bin
a second time.The steps I did to patch the SHA2.hs file in Crypto-4.2.4:
cabal unpack crypto-4.2.4
cd Crypto-4.2.4
patch -p1 < crypto-4.2.4-ghc-7.4.patch
sudo cabal install
.PS: I used this patchfile. Then I did the last step a third time.
If you're missing the
sha256sum
command with Homebrew, it's provided bycoreutils
. You have to change your$PATH
before runningcabal install git-annex.cabal
: