chroma command not found

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

Introduction

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

chroma: command not found

or when using sudo you get the following error message

sudo: chroma: command not found

Solutions to chroma: command not found

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

In Ubuntu chroma is provided by golang-chroma package.

golang-chroma is:

Chroma takes source code and other structured text and converts it into syntax highlighted HTML, ANSI-coloured text, etc.

Chroma is based heavily on Pygments (http://pygments.org/), and includes translators for Pygments lexers and styles.

This package contains the compiled chroma and chromad binaries.

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

sudo apt-get -y install golang-chroma

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

You can also use apt command to install golang-chroma.

sudo apt -y install golang-chroma

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

sudo aptitude install golang-chroma

Summary

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