docbook-2-rtf command not found

In this troubleshooting guide we learn how to fix docbook-2-rtf command not found error message

Introduction

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

docbook-2-rtf: command not found

or when using sudo you get the following error message

sudo: docbook-2-rtf: command not found

Solutions to docbook-2-rtf: command not found

How To Fix docbook-2-rtf: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu docbook-2-rtf is provided by sgml2x package.

sgml2x is:

sgml2x allows to easily format SGML and XML documents using DSSSL stylesheets, and provides the following features:

  • Multiple possible stylesheets per document class
  • Easy specification of style-sheets using sort aliases
  • Easy integration of new stylesheets by adding a simple new definition file in a configuration directory
  • The caller can specify a PATH-like list of configuration directories, defaulting to one system-wide, one per-user, and one per-project configuration directory
  • Automatic selection of a default stylesheet to be used

It will currently be most useful with one of the suggested sets of DSSSL stylesheets for DocBook.

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

sudo apt-get -y install sgml2x

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

You can also use apt command to install sgml2x.

sudo apt -y install sgml2x

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

sudo aptitude install sgml2x

Summary

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