Just a few notes about the defected cabal-install program in the latest Haskell latform, although it seems to be older than the latest release. So why spending two hours trying to solve this infamous
cabal: Codec.Compression.Zlib: incorrect header check? Because I just want to try pandoc : smile :
Ok, I must admit it was not so hard to get things working, after googling a little bit and finding THE correct solution (among a lot of useless threads)–in fact, I spent two hours on that bug, more than two third of it being devoted to reading all those threads and tweaking my current install. Then, I found it: You just need to upgrade to the latest version of cabal (1.10) and cabal-install (which are probably patched). They can be found from the Darcs repository (yes, of course it needs a working darcs, that cannot compile from source unless you already have a working cabal-install program because of the many dependencies, so I choose an x86-64 binary from http://darcs.net/). The main problem stands from the package format which is not a tar.gz file as expected.
$ darcs get http://darcs.haskell.org/cabal-branches/cabal-1.10 $ darcs get http://darcs.haskell.org/cabal-install $ cd cabal-1.10/ $ ghc --make Setup $ ./Setup configure --user $ ./Setup build $ ./Setup install $ cd ../cabal-install/ $ chmod +x bootstrap.sh $ ./bootstrap.sh
Note that for cabal-install the instructions resume to a single command! Once everything is finihed, you can just update your package list using
cabal update at the command line.
So let’s go now:
$ cabal install pandoc -fhighlighting
At the end, if everything is working properly, you shoud see something like: