[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 Ashok

Linux Systems Architect at Endurance International Group. Linux lover. Like to play on Linux console. I started this blog to share and discuss Linux thoughts.

Always happy for an open discussion! Write to arun (@) crybit (dot) com. Check about me for more details. About this blog and our strong members, check The team CryBit.com

Leave a Reply

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