How to install pandoc on CentOS


Pandoc is a universal document converter

Home page: http://pandoc.org/

pandoc

Step 1:
Download releases here: https://github.com/jgm/pandoc/releases

[root@tutorialspots ~]# wget https://github.com/jgm/pandoc/releases/download/2.5/pandoc-2.5-linux.tar.gz
--2019-01-06 07:28:53--  https://github.com/jgm/pandoc/releases/download/2.5/pandoc-2.5-linux.tar.gz
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/571770/c9516080-f227-11e8-88fd-a0c3bf0ca3a6?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190106%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190106T132853Z&X-Amz-Expires=300&X-Amz-Signature=dab8b9f4bab9abd79f6214e995a3adb972bdd32ce75d78bbad2b18f5357ef7bd&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dpandoc-2.5-linux.tar.gz&response-content-type=application%2Foctet-stream [following]
--2019-01-06 07:28:53--  https://github-production-release-asset-2e65be.s3.amazonaws.com/571770/c9516080-f227-11e8-88fd-a0c3bf0ca3a6?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190106%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190106T132853Z&X-Amz-Expires=300&X-Amz-Signature=dab8b9f4bab9abd79f6214e995a3adb972bdd32ce75d78bbad2b18f5357ef7bd&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dpandoc-2.5-linux.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.101.123
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.101.123|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 28483450 (27M) [application/octet-stream]
Saving to: ‘pandoc-2.5-linux.tar.gz’

100%[======================================>] 28,483,450  41.3MB/s   in 0.7s

2019-01-06 07:28:55 (41.3 MB/s) - ‘pandoc-2.5-linux.tar.gz’ saved [28483450/28483450]

Step 2:

[root@tutorialspots ~]# tar -xvf pandoc-2.5-linux.tar.gz
pandoc-2.5/
pandoc-2.5/bin/
pandoc-2.5/bin/pandoc
pandoc-2.5/bin/pandoc-citeproc
pandoc-2.5/share/
pandoc-2.5/share/man/
pandoc-2.5/share/man/man1/
pandoc-2.5/share/man/man1/pandoc.1.gz
pandoc-2.5/share/man/man1/pandoc-citeproc.1.gz

Step 3:

ln -s /root/pandoc-2.5/bin/pandoc /usr/bin/pandoc

Step 4: install xelatex (in package: texlive-xetex)

yum install texlive-xetex

Result:

[root@tutorialspots ~]# yum install texlive-xetex
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.steadfastnet.com
 * epel: kdeforge2.unl.edu
 * extras: mirror.genesisadaptive.com
 * ius: dfw.mirror.rackspace.com
 * nux-dextop: mirror.li.nux.ro
 * remi-safe: mirror.bebout.net
 * updates: mirror.compevo.com
Resolving Dependencies
--> Running transaction check
---> Package texlive-xetex.noarch 2:svn26330.0.9997.5-43.el7 will be installed
--> Processing Dependency: texlive-xetex-bin for package: 2:texlive-xetex-svn26330.0.9997.5-43.el7.noarch
--> Processing Dependency: tex-xetexconfig for package: 2:texlive-xetex-svn26330.0.9997.5-43.el7.noarch
--> Processing Dependency: tex(xetex.def) for package: 2:texlive-xetex-svn26330.0.9997.5-43.el7.noarch
--> Running transaction check
---> Package texlive-xetex-bin.x86_64 2:svn26912.0-43.20130427_r30134.el7 will be installed
--> Processing Dependency: teckit for package: 2:texlive-xetex-bin-svn26912.0-43.20130427_r30134.el7.x86_64
--> Processing Dependency: libTECkit.so.0()(64bit) for package: 2:texlive-xetex-bin-svn26912.0-43.20130427_r30134.el7.x86_64
---> Package texlive-xetex-def.noarch 2:svn29154.0.95-43.el7 will be installed
---> Package texlive-xetexconfig.noarch 2:svn28819.0-43.el7 will be installed
--> Running transaction check
---> Package teckit.x86_64 0:2.5.1-11.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch    Version                               Repository
                                                                           Size
================================================================================
Installing:
 texlive-xetex        noarch  2:svn26330.0.9997.5-43.el7            base   69 k
Installing for dependencies:
 teckit               x86_64  2.5.1-11.el7                          base  285 k
 texlive-xetex-bin    x86_64  2:svn26912.0-43.20130427_r30134.el7   base  547 k
 texlive-xetex-def    noarch  2:svn29154.0.95-43.el7                base   23 k
 texlive-xetexconfig  noarch  2:svn28819.0-43.el7                   base   34 k

Transaction Summary
================================================================================
Install  1 Package (+4 Dependent packages)

Total download size: 958 k
Installed size: 3.2 M
Is this ok [y/d/N]: y
Downloading packages:
(1/5): texlive-xetex-svn26330.0.9997.5-43.el7.noarch.rpm   |  69 kB   00:00
(2/5): teckit-2.5.1-11.el7.x86_64.rpm                      | 285 kB   00:00
(3/5): texlive-xetex-bin-svn26912.0-43.20130427_r30134.el7 | 547 kB   00:00
(4/5): texlive-xetex-def-svn29154.0.95-43.el7.noarch.rpm   |  23 kB   00:00
(5/5): texlive-xetexconfig-svn28819.0-43.el7.noarch.rpm    |  34 kB   00:00
--------------------------------------------------------------------------------
Total                                              2.1 MB/s | 958 kB  00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : teckit-2.5.1-11.el7.x86_64                                   1/5
  Installing : 2:texlive-xetexconfig-svn28819.0-43.el7.noarch               2/5
  Installing : 2:texlive-xetex-def-svn29154.0.95-43.el7.noarch              3/5
  Installing : 2:texlive-xetex-svn26330.0.9997.5-43.el7.noarch              4/5
  Installing : 2:texlive-xetex-bin-svn26912.0-43.20130427_r30134.el7.x86_   5/5
  Verifying  : 2:texlive-xetex-bin-svn26912.0-43.20130427_r30134.el7.x86_   1/5
  Verifying  : 2:texlive-xetex-svn26330.0.9997.5-43.el7.noarch              2/5
  Verifying  : 2:texlive-xetex-def-svn29154.0.95-43.el7.noarch              3/5
  Verifying  : 2:texlive-xetexconfig-svn28819.0-43.el7.noarch               4/5
  Verifying  : teckit-2.5.1-11.el7.x86_64                                   5/5

Installed:
  texlive-xetex.noarch 2:svn26330.0.9997.5-43.el7

Dependency Installed:
  teckit.x86_64 0:2.5.1-11.el7
  texlive-xetex-bin.x86_64 2:svn26912.0-43.20130427_r30134.el7
  texlive-xetex-def.noarch 2:svn29154.0.95-43.el7
  texlive-xetexconfig.noarch 2:svn28819.0-43.el7

Complete!

Done!

Example:

pandoc -f epub --pdf-engine=xelatex  1.epub -o 1.pdf
pandoc 1.epub -o 1.docx

Leave a Reply