license-detector command not found

In this troubleshooting guide we learn how to fix license-detector command not found error message

Introduction

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

license-detector: command not found

or when using sudo you get the following error message

sudo: license-detector: command not found

Solutions to license-detector: command not found

How To Fix license-detector: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu license-detector is provided by license-detector package.

license-detector is:

It scans the given directory for license files, normalizes and hashes them and outputs all the fuzzy matches with the list of reference texts. The returned names follow SPDX standard.

Why? There are no similar projects which can be compiled into a native binary without dependencies and also support the whole SPDX license database (≈400 items). This implementation is also fast, requires little memory, and the API is easy to use.

The detection algorithm is not template matching; this directly implies that go-license-detector does not provide any legal guarantees. The intended area of it’s usage is data mining.

This package provides the command line interface.

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

sudo apt-get -y install license-detector

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

You can also use apt command to install license-detector.

sudo apt -y install license-detector

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

sudo aptitude install license-detector

Summary

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