c2hs command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
c2hs: command not found
or when using sudo you get the following error message
sudo: c2hs: command not found
Solutions to c2hs: command not found
How To Fix c2hs: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu c2hs is provided by c2hs package.
c2hs is:
C->Haskell is an interface generator that simplifies the development of Haskell bindings to C libraries. The tool processes existing C header files that determine data layout and function signatures on the C side in conjunction with Haskell modules that specify Haskell-side type signatures and marshaling details. Hooks embedded in the Haskell code signal access to C structures and functions – they are expanded by the interfacing tool in dependence on information from the corresponding C header file.
Haskell 98 is “the” standard lazy functional programming language. More info plus the language definition is at http://www.haskell.org/.
This package contains the c2hs parser.
To fix this problem, we can install more using the command below.
sudo apt-get -y install c2hs
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install c2hs.
sudo apt -y install c2hs
Or if you have aptitude installed you can use the following command.
sudo aptitude install c2hs
Summary
In this tutorial we learn how to fix c2hs command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.