[Solved] Error: Command line calculator ‘bc’ not found!

I got an error related to “bc” the command-line calculator while executing the MySQL tuning script. The fix was also simple 🙂

Error details

Error: Command line calculator 'bc' not found!

The “bc” is the command-line calculator for Linux. You can simply do calculations through your command-line.

bc is a language to supports arbitrary precision numbers with interactive execution of statements. It starts by processing code from all the files listed on the command line in the order. After all files have been processed, it will start reading from the standard input. All code is executed as it is read.

See some example here:

bc <<< 10*25
250
bc <<< 10-25
-15

Solution

The solution is quite simple, install the utility ‘bc’ using YUM

yum install bc

That’s it 🙂

Related Links:
How to install GCC (GNU C / C++) compiler – Unix/Linux
[Solved] Memory error with YUM

Dump Mongo DB collections and move it to an S3 bucket.

Requirement: Need to write a script to create Mongo DB collections dump and move the dump to an AWS s3 bucket.

Prerequisites: SSH access to Mongo DB server, IAM user with AWS s3 full [or write] access, aws-cli on server, knowledge in Mongo commands for dump creation.

As we need to move the dump to an S3 bucket, first we need to configure IAM user. Then only we can move the dump to S3 bucket. To configure IAM, you need to install aws-cli tool on the machine. The document added below will help you on that.

Post navigation

Arunlal A

Senior System Developer at Zeta. Linux lover. Traveller. Let's connect! Whether you're a seasoned DevOps pro or just starting your journey, I'm always eager to engage with like-minded individuals. Follow my blog for regular updates, connect on social media, and let's embark on this DevOps adventure together! Happy coding and deploying!

2 thoughts on “[Solved] Error: Command line calculator ‘bc’ not found!

Leave a Reply

Your email address will not be published. Required fields are marked *