code2html command not found

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

Introduction

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

code2html: command not found

or when using sudo you get the following error message

sudo: code2html: command not found

Solutions to code2html: command not found

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

In Ubuntu code2html is provided by code2html package.

code2html is:

Code2html is a perl script which converts a program source code to syntax highlighted HTML, or any other target for which rules are defined.

It may be used as a simple console program, converting a single source code file to a single output file, it can patch HTML files including special command sequences to insert syntax highlighted snippets of code, or it can be used as a CGI script.

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

sudo apt-get -y install code2html

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

You can also use apt command to install code2html.

sudo apt -y install code2html

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

sudo aptitude install code2html

Summary

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