hp2ps command not found

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

Introduction

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

hp2ps: command not found

or when using sudo you get the following error message

sudo: hp2ps: command not found

Solutions to hp2ps: command not found

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

In Ubuntu hp2ps is provided by ghc package.

ghc is:

The Glorious Glasgow Haskell Compilation system (GHC) is a compiler for Haskell.

Haskell is “the” standard lazy functional programming language. The language definition and additional documentation can be found in the `haskell-doc' package. Alternatively, there is an online version at http://haskell.org/onlinereport/.

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

sudo apt-get -y install ghc

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

You can also use apt command to install ghc.

sudo apt -y install ghc

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

sudo aptitude install ghc

Summary

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