To install git-annex from scratch, you need a lot of stuff. Really quite a lot.

  • Haskell stuff
    • The Haskell Platform (GHC 7.4 or newer)
    • A ton of haskell libraries. Rather than try to list them all here, see git-annex.cabal. Probably the easiest way to install them: cabal update; cabal install git-annex --only-dependencies
  • Shell commands
    • git (1.7.2 or newer; 1.8.5 or newer recommended)
    • xargs
    • rsync
    • curl (optional, but recommended)
    • wget (optional)
    • sha*sum (optional)
    • gpg (optional; needed for encryption)
    • lsof (optional; recommended for watch mode)
    • gcrypt (optional)
    • nocache (optional)
    • multicast DNS support, provided on linux by nss-mdns (optional; recommended for the assistant to support pairing well)
    • ikiwiki (optional; used to build the docs)

Then just download git-annex and run: make; make install

I tried this on ubuntu 14.04 without any previous haskell installs and cabal failed to resolve the dependencies:

rejecting: optparse-applicative-0.9.0 (conflict: hjsmin => optparse-applicative>=0.7 && <0.9)

full log

Comment by azul Thu Jun 19 08:49:05 2014

apt-get install happy alex libghc-hjsmin-dev solved the problem for me. The hjsmin lib was probably crucial. It seems a bunch of dependencies can also be installed as debs rather than through cabal. standalone/android/buildchroot-inchroot gave me a clue.

Comment by azul Fri Jun 20 06:13:09 2014

Next thing i ran into was missing c2hs. So apt-get install c2hs before running the cabal install otherwise...

$ cabal install git-annex --only-dependencies
Resolving dependencies...
Configuring gnuidn-0.2.1...
cabal: The program c2hs is required but it could not be found.
Failed to install gnuidn-0.2.1
cabal: Error: some packages failed to install:
gnuidn-0.2.1 failed during the configure step. The exception was:
ExitFailure 1
network-protocol-xmpp-0.4.6 depends on gnuidn-0.2.1 which failed to install.
Comment by azul Fri Jun 20 06:35:35 2014

@azul, thanks for hints, but it still fails. No wonders though - this is Haskell, kids.

$ cabal install git-annex --only-dependencies
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: git-annex-5.20140817
trying: git-annex-5.20140817:+webapp
trying: git-annex-5.20140817:+s3
trying: git-annex-5.20140817:+dns
trying: dns-1.4.3
trying: yesod-1.2.6.1
trying: yesod-auth-1.3.4.2
trying: http-client-0.3.7.1
trying: http-client-0.3.7.1:+network-uri
trying: hS3-0.5.8
trying: hxt-9.3.1.6
trying: hxt-9.3.1.6:-network-uri
rejecting: network-2.6.0.1, 2.6.0.0 (conflict: hxt-9.3.1.6:network-uri =>
network>=2.4 && <2.6)
rejecting: network-2.5.0.0, 2.4.2.3, 2.4.2.2, 2.4.2.1, 2.4.2.0, 2.4.1.2,
2.4.1.1, 2.4.1.0, 2.4.0.1, 2.4.0.0, 2.3.2.0, 2.3.1.1, 2.3.1.0, 2.3.0.14,
2.3.0.13, 2.3.0.12, 2.3.0.11, 2.3.0.10, 2.3.0.9, 2.3.0.8, 2.3.0.7, 2.3.0.6,
2.3.0.5, 2.3.0.4, 2.3.0.3, 2.3.0.2, 2.3.0.1, 2.3 (conflict:
http-client-0.3.7.1:network-uri => network>=2.6)
rejecting: network-2.2.3.1, 2.2.3, 2.2.1.10, 2.2.1.9, 2.2.1.8, 2.2.1.7,
2.2.1.6, 2.2.1.5, 2.2.1.4, 2.2.1.3, 2.2.1.2, 2.2.1.1, 2.2.1, 2.2.0.1, 2.2.0.0,
2.1.0.0, 2.0 (conflict: dns => network>=2.3)
Comments on this page are closed.