precious command not found

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

Introduction

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

precious: command not found

or when using sudo you get the following error message

sudo: precious: command not found

Solutions to precious: command not found

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

In Ubuntu precious is provided by precious package.

precious is:

Precious is a command-line tool to unify the execution of source code tidiers and validators.

With Precious you can configure all of your code quality tool rules in one place and easily run precious from your commit hooks and in CI.

Several tidier+validator unifiers/orchestraters exists, including perl-based TidyAll (the predecessor of Precious), Python-based pre-commit, Go-based lefthook, NodeJS-based husky and lint-staged, and Ruby-based overcommit. For comparison, Precious is Rust-based with these notable features:

  • handles directory-wide and project-wide tasks (unlike TidyAll)
  • stores task settings locally (unlike pre-commit)
  • cannot cache tasks (unlike TidyAll)
  • supports incremental linting (unlike lefthook, husky, lint-staged or overcommit)

For a more detailed comparison, see https://blog.urth.org/2020/05/08/comparing-code-quality-meta-tools/.

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

sudo apt-get -y install precious

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

You can also use apt command to install precious.

sudo apt -y install precious

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

sudo aptitude install precious

Summary

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