calc command not found

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

Introduction

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

calc: command not found

or when using sudo you get the following error message

sudo: calc: command not found

Solutions to calc: command not found

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

In Ubuntu calc is provided by calc package.

calc is:

Calc is an arbitrary precision arithmetic system that uses a C-like language. Calc is useful as a calculator, an algorithm prototyper and as a mathematical research tool. More importantly, calc provides one with a machine independent means of computation. Calc comes with a rich set of builtin mathematical and programmatic functions.

Calc is built on top of the library libcalc that represents numeric values as fractions reduced to their lowest terms. This library can also be used to add arbitrary precision capabilities to your own programs and is available in the Debian package `calc-dev'.

Previously, this package was named apcalc' in Debian due to a name collision. However, the previous calc’ Debian package vanished long ago, so apcalc' was renamed back to calc’ to match the upstream name.

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

sudo apt-get -y install calc

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

You can also use apt command to install calc.

sudo apt -y install calc

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

sudo aptitude install calc

Summary

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