pandoc command not found

In this troubleshooting guide we learn how to fix pandoc command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

pandoc: command not found

or when using sudo you get the following error message

sudo: pandoc: command not found

Solutions to pandoc: command not found

How To Fix pandoc: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu pandoc is provided by pandoc package.

pandoc is:

Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can read several dialects of Markdown and (subsets of) HTML, reStructuredText, LaTeX, DocBook, JATS, MediaWiki markup, DokuWiki markup, TWiki markup, TikiWiki markup, Jira markup, Creole 1.0, Haddock markup, OPML, Emacs Org-mode, Emacs Muse, txt2tags, ipynb (Jupyter notebooks), Vimwiki, Word Docx, ODT, EPUB, FictionBook2, roff man, Textile, and CSV, and it can write Markdown, reStructuredText, XHTML, HTML 5, LaTeX (including rendering as plain PDF or beamer slide shows), ConTeXt, DocBook, JATS, OPML, TEI, OpenDocument, ODT, Word docx, PowerPoint pptx, RTF, MediaWiki, DokuWiki, XWiki, ZimWiki, Textile, Jira, roff man, roff ms, GNU Texinfo, plain text, Emacs Org-Mode, AsciiDoc, Haddock markup, EPUB (v2 and v3), ipynb, FictionBook2, InDesign ICML, Muse, LaTeX beamer slides, PowerPoint, and several kinds of HTML/javaScript slide shows (S5, Slidy, Slideous, DZSlides, reveal.js).

In contrast to most existing tools for converting Markdown to HTML, pandoc has a modular design: it consists of a set of readers, which parse text in a given format and produce a native representation of the document, and a set of writers, which convert this native representation into a target format. Thus, adding an input or output format requires only adding a reader or writer.

This package contains the pandoc tool.

Some uses of Pandoc require additional packages:

  • SVG content in PDF output requires librsvg2-bin.
  • YAML metadata in TeX-related output requires texlive-latex-extra.
  • *.hs filters not set executable requires ghc.
  • *.js filters not set executable requires nodejs.
  • *.php filters not set executable requires php.
  • *.pl filters not set executable requires perl.
  • *.py filters not set executable requires python.
  • *.rb filters not set executable requires ruby.
  • *.r filters not set executable requires r-base-core.
  • LaTeX output, and PDF output via PDFLaTeX, require texlive-latex-recommended.
  • XeLaTeX output, and PDF output via XeLaTeX, require texlive-xetex.
  • LuaTeX output, and PDF output via LuaTeX, require texlive-luatex.
  • ConTeXt output, and PDF output via ConTeXt, require context.
  • PDF output via wkhtmltopdf requires wkhtmltopdf.
  • Roff man and roff ms output, and PDF output via roff ms, require groff.
  • MathJax-rendered equations require libjs-mathjax.
  • KaTeX-rendered equations require node-katex.
  • option –csl may use styles in citation-style-language-styles.

To fix this problem, we can install more using the command below.

sudo apt-get -y install pandoc

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install pandoc.

sudo apt -y install pandoc

Or if you have aptitude installed you can use the following command.

sudo aptitude install pandoc

Summary

In this tutorial we learn how to fix pandoc command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.