Installing pandoc on Fedora 10
I’ve been using pandoc to convert stuff - mostly Restructured Text - to Markdown as part of a wiki migration. The pandoc site has instructions for installing on a bunch of operating systems but none RHEL/CentOS/Fedora- like. This is a quick set of instructions for Fedora that should work for similar distros. First, install the Haskell compiler and Cabal (yet another pear/cpan/rubygems like plug-in loader/manager):
$ sudo yum install ghc cabal-installUpdate the Cabal data store and install the plug-ins pandoc
requires, utf8-string and zip-archive.
$ sudo cabal update$ sudo cabal install zip-archive utf8-stringNow you can either use Cabal to install pandoc itself:
$ sudo cabal install pandocOr you can download the source and compile it yourself.
$ cd /tmp$ wget http://pandoc.googlecode.com/files/pandoc-1.2.tar.gz$ tar -zxf pandoc-1.2.tar.gz$ cd pandoc-1.2Now you need to edit the pandoc.cabal file and remove:
Executable hsmarkdownHs-Source-Dirs: srcMain-Is: hsmarkdown.hsGhc-Options: -Wall -threadedGhc-Prof-Options: -auto-allExtensions: CPP, TemplateHaskellif flag(wrappers) Buildable: Trueelse Buildable: FalseFrom the bottom of the pandoc.cabal file. Next, run make.
$ CABALOPTS=--user makeAnd finally, if the make works, install the tool:
$ sudo make install