How To Install license-detector on Ubuntu 22.04
Introduction
In this tutorial we learn how to install license-detector
on Ubuntu 22.04.
What is license-detector
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.
There are three methods to install license-detector
on Ubuntu 22.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install license-detector Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install license-detector
using apt-get
by running the following command:
sudo apt-get -y install license-detector
Install license-detector Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install license-detector
using apt
by running the following command:
sudo apt -y install license-detector
Install license-detector Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install license-detector
using aptitude
by running the following command:
sudo aptitude -y install license-detector
How To Uninstall license-detector on Ubuntu 22.04
To uninstall only the license-detector
package we can use the following command:
sudo apt-get remove license-detector
Uninstall license-detector And Its Dependencies
To uninstall license-detector
and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:
sudo apt-get -y autoremove license-detector
Remove license-detector Configurations and Data
To remove license-detector
configuration and data from Ubuntu 22.04 we can use the following command:
sudo apt-get -y purge license-detector
Remove license-detector configuration, data, and all of its dependencies
We can use the following command to remove license-detector
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge license-detector
References
Summary
In this tutorial we learn how to install license-detector
package on Ubuntu 22.04 using different package management tools: apt
, apt-get
and aptitude
.