Skip to content

Instantly share code, notes, and snippets.

@trendels
Last active September 14, 2017 07:17
Show Gist options
  • Save trendels/8371fa77ac3593824dde to your computer and use it in GitHub Desktop.
Save trendels/8371fa77ac3593824dde to your computer and use it in GitHub Desktop.

How to install pandoc from source on CentOS 6.x

  • Make a directory for the Haskell installation, I like to use /opt/haskell:

    $ sudo mkdir /opt/haskell
    $ sudo chown $USER /opt/haskell
    
  • Install GHC 7.6.3.

    Download the x86_64 binary distribution, unpack it, and install with:

    $ ./configure --prefix=/opt/haskell
    $ make install
    

    Make sure ghc is in the PATH for the following steps:

    $ export PATH=$PATH:/opt/haskell/bin
    
  • Install the Haskell Platform.

    Install dependencies:

    $ sudo yum install gmp-devel zlib-devel mesa-libGL-devel \
      mesa-libGLU-devel freeglut-devel
    

    Download the source tarball, unpack it, and install with:

    $ ./configure --prefix=/opt/haskell
    $ make
    $ make install
    

    This finishes the system-wide installation:

    $ sudo chown -Rh root:root /opt/haskell
    
  • You can now (as a regular user), run

    $ cabal update
    $ cabal install pandoc
    

    After this the pandoc executable can be found at ~/.cabal/bin/pandoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment