bc command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
bc: command not found
or when using sudo you get the following error message
sudo: bc: command not found
Solutions to bc: command not found
How To Fix bc: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu bc is provided by bc package.
bc is:
GNU bc is an interactive algebraic language with arbitrary precision which follows the POSIX 1003.2 draft standard, with several extensions including multi-character variable names, an `else’ statement and full Boolean expressions. GNU bc does not require the separate GNU dc program.
To fix this problem, we can install more using the command below.
sudo apt-get -y install bc
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install bc.
sudo apt -y install bc
Or if you have aptitude installed you can use the following command.
sudo aptitude install bc
Summary
In this tutorial we learn how to fix bc command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.