mediawiki2latex command not found

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

Introduction

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

mediawiki2latex: command not found

or when using sudo you get the following error message

sudo: mediawiki2latex: command not found

Solutions to mediawiki2latex: command not found

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

In Ubuntu mediawiki2latex is provided by mediawiki2latex package.

mediawiki2latex is:

This project provides a simple way of turning a HTML page hosted on a server into a high quality PDF version as well an its LaTeX source file respectively.

Particular care has been to generate esthetically pleasing results for pages hosted on servers running MediaWiki.

This project provides a simple default mode which just requires the URL to the page and creates a PDF file, by processing the HTML generated by the (MediaWiki-) server. It also provides extended possibilities giving a fine grained control over the conversion process to users familiar with LaTeX and MediaWiki.

Much effort was put into providing reasonable defaults for this way of processing for the needs of the English and German Wikibooks projects. Images are also downloaded, and if necessary modified for use in a LaTeX document. The latest test run on more than 2000 featured articles on the English Wikipedia completed without failures.

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

sudo apt-get -y install mediawiki2latex

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

You can also use apt command to install mediawiki2latex.

sudo apt -y install mediawiki2latex

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

sudo aptitude install mediawiki2latex

Summary

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