a2x command not found

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

Introduction

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

a2x: command not found

or when using sudo you get the following error message

sudo: a2x: command not found

Solutions to a2x: command not found

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

In Ubuntu a2x is provided by asciidoc-base package.

asciidoc-base is:

AsciiDoc is a text document format for writing articles, books, manuals and UNIX man pages. AsciiDoc files can be translated to HTML (with or without stylesheets), DocBook (articles, books and refentry documents) and LinuxDoc using the asciidoc command. AsciiDoc can also be used to build and maintain websites.

You write an AsciiDoc document the same way you would write a normal text document, there are no markup tags or weird format notations. AsciiDoc files are designed to be viewed, edited and printed directly or translated to other presentation formats

This package provides binary files for the package. Be careful, you won’t be able to build pdf files without the dblatex or fop dependencies. See asciidoc-dblatex or asciidoc-fop metapackages for this.

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

sudo apt-get -y install asciidoc-base

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

You can also use apt command to install asciidoc-base.

sudo apt -y install asciidoc-base

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

sudo aptitude install asciidoc-base

Summary

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