According to the installation guide from the Pandoc homepage
We need to install the Haskell platform first.
-
Adding the following entry to
/etc/pacman.conf
(above [extra])(ref):[haskell-core] Server = http://xsounds.org/~haskell/core/$arch
-
Then using the following commands to add the key
sudo pacman-key -r 4209170B sudo pacman-key --lsign-key 4209170B
-
(Optional)If you don’t get the following error ignore this step.
$ sudo pacman-key -r 4209170B
gpg: connecting dirmngr at ‘/root/.gnupg/S.dirmngr’ failed: IPC connect call failed
gpg: keyserver receive failed: No dirmngr
==> ERROR: Remote key not fetched correctly from keyserver.The solution is to create an empty
dirmngr_ldapservers.conf
file under/root/.gnupg
(I don’t have the.gnupg
folder, so need to create one first) and afterwards, thepacman-key
commands should work fine(ref) :sudo mkdir -p /root/.gnupg sudo touch /root/.gnupg/dirmngr_ldapservers.conf
-
Next force a refresh of all package lists:
sudo pacman -Syy
-
Then install the
Haskell platform
from the official repositories(ref):sudo pacman -S ghc cabal-install haddock happy alex
-
Then use the
cabal
tool to install pandoc, you can updatecabal-install
first if new version is available(time consuming process).cabal update cabal install cabal-install cabal install pandoc
-
At last, set
PATH
variable so that thepandoc
command can be found. Adding the following line to the~/.bash_profile
file:export PATH=~/.cabal/bin:$PATH
References
http://sapiengames.com/2014/04/05/install-haskell-platform-arch-linux/
http://johnmacfarlane.net/pandoc/installing.html
https://wiki.archlinux.org/index.php/ArchHaskell
https://wiki.archlinux.org/index.php/Haskell#Haskell_platform