Installing bc package/ floating point arithmetic in BASH

So I want to do floating point arithmetic in BASH, but I have trouble installing the bc package (https://www.gnu.org/software/bc/).

I type in:
apt-get install bc

and it tells me:

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package bc

So. Any idea on how to either do floating point arithmetic in BASH some other way, or how to install bc on beaglebone black?

Alternatively, is it possible to pass in a value from bash to like a java script or something?

apt-get update
apt-get install bc

Regards,

Hi I tried that but it still didn’t work. apt-get update had problems:

root@beaglebone:~# apt-get update
Err http://repos.rcn-ee.net wheezy Release.gpg
Could not resolve ‘repos.rcn-ee.net
Err http://security.debian.org wheezy/updates Release.gpg
Could not resolve ‘security.debian.org
Err http://ftp.us.debian.org wheezy Release.gpg
Could not resolve ‘ftp.us.debian.org
Err http://ftp.us.debian.org wheezy-updates Release.gpg
Could not resolve ‘ftp.us.debian.org
Reading package lists… Done
W: Failed to fetch http://ftp.us.debian.org/debian/dists/wheezy/Release.gpg Could not resolve ‘ftp.us.debian.org

W: Failed to fetch http://ftp.us.debian.org/debian/dists/wheezy-updates/Release.gpg Could not resolve ‘ftp.us.debian.org

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/Release.gpg Could not resolve ‘security.debian.org

W: Failed to fetch http://repos.rcn-ee.net/debian/dists/wheezy/Release.gpg Could not resolve ‘repos.rcn-ee.net

W: Some index files failed to download. They have been ignored, or old ones used instead.

You should probably check to make sure you’re actually connected to the internet . . . chances are really good based on your output that you’re not…

You were right. Thanks! It works now.