diff: command not found

While attempting to diff two files on my Cent 6.4 test system, I ran into a strange error

[root@mongo-test3 tmp]# diff

-bash: diff: command not found

[root@mongo-test3 tmp]# which diff

/usr/bin/which: no diff in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin)

Attempting to install diff via yum did not solve the problem

[root@mongo-test3 tmp]# yum install diff

Loaded plugins: fastest mirror, security, version lock

Loading mirror speeds from cached hostile

* epel: mirrors.kernel.org

Setting up Install Process

No package diff available.

Error: Nothing to do

I tried using an alternative to diff, such as zdiff, or vimdiff. However both of those have dependencies on diff, and thus would not run.


yum install diffutils




Arduino Powered Foosball Table

wpid-foosball005-2013-04-15-23-11.jpg  + wpid-foosball008-2013-04-15-23-11.jpg  = Screen Shot 2013-04-15 at 11.57.54 PM

Why Attach an Arduino to a Foosball Table?

– Because the foosball table is clear on the opposite side of the building.

– Because we can!

What are those parts?

– The gold disk is a piezo electric transducer, commonly known as an electric guitar pickup. It converts vibrations into electricity.

– The red circuit board is an Arduino with Ethernet. It uses the standard Arduino library to handle dhcp requests.

– The circuit board is soldered after the knock sensor tutorial on arduino.cc http://www.arduino.cc/en/Tutorial/KnockSensor

– They grey cables are Power Over Ethernet Injectors (POE). They are not required if your foosball table is in reach of a power outlet.

Where can I buy this stuff?

Arduino – http://arduino.cc/en/Main/ArduinoBoardEthernet

POE Cable – https://www.sparkfun.com/products/10759

Piezo Transducer – http://amzn.to/XDxBiT

1 Mega Ohm Resistor – Radio Shack

Circuit board – http://amzn.to/XDxHqM

Headers – https://www.sparkfun.com/products/116

Wire – Your local garbage can

How do I code it?

See the code on github.com/spudstud/Foosball . You will need an account on cosm.com to store your sensor readings. Replace the “Feed ID” with your feed Id, and the “Data-stream” with your data stream name.

You will need to generate a new Private API Key and replace the API key in the code with your own API key.

Cosm.com documents how to get code from an arduino to their servers here: https://cosm.com/support/examples and here: http://arduino.cc/en/Tutorial/PachubeClient

The webpage uses jquery and the cosm javascript library. You can find examples of how to use it in the “Sandbox” directory in github https://github.com/spudstud/Foosball/tree/master/sandbox

The Cosm javascript library is documented here: http://cosm.github.io/cosm-js/ Cosm developers are very active on stackoverflow.com

Once you have the webpage how you want it. You will need to create an ubuntu virtual machine and install apache to host the website. It does not need to be on the same network as your sensor.

I highly recommend setting up your ubuntu web server using vagrant.  http://docs.vagrantup.com/v2/getting-started/index.html

How did you make the webpage so pretty?

The majority of the webpage was coded by a friend who does web development professionally.

The github and “i” icons are actually fonts, not images. http://bit.ly/1190Sjj

The green button is made entirely with css3 and gradients.

The graph is made with cosm’s graph builder http://bit.ly/1181kRM

Only the flat piezo elements work, speakers pulled from computer cases absolutely do not work. http://bit.ly/XOkrSu

What If I want to make my own awesome foosball table, but I have questions?

Leave a comment below

Ask your question on stack overflow and tag “cosm”

Go to the Arduino Forums

Any problems you discovered on the way?

I was going to use a raspberry Pi, but they don’t have analog sensors. Lady Ada has a great article of how to work around this: http://bit.ly/VHTEmS

Arduino Ethernet has 5 analog pins, but pins 4 and 5 are used by the ethernet shield. Pins 0 and 1 are also shared and shouldn’t be used.

What if I want to see pictures and a video of the table?

Here you are!







available unavailable




configure: error: TORQUE needs pthreads in order to build


While installing Torque, you run ./configure and get the following error

configure: error: TORQUE needs pthreads in order to build


Searching google seems to indicate that you need the windows library pthreads, or that there is a problem with the ./configure file, however both of these are mistaken.

The real solution is to install a g++ compiler


yum install gcc-g++


apt-get install g++


The reason why is that Torque 4.x has moved from C to C++ and needs the C++ compiler.

checking whether to disable strict gcc warnings… no
checking for stat64… no
checking for stat64… no
checking for open64… no
checking for lseek64… no
checking for struct stat64.st_mode… no
checking for struct stat64.st_mode… no
checking if largefile compiles (looking at you, OSX)… checking for pthread_create in -lpthread… no
configure: error: TORQUE needs pthreads in order to build
make: *** No rule to make target `clean’.  Stop.



The default behavior of torque has been changed to avoid this problem in the future.

Lack Rack

The Lack Rack


This is a proof of concept server rack consisting entirely of IKEA coffee tables. 5 Racks in total make for 45 U. The best part is that each coffee table only costs $9 USD



Which to Buy

If you decide to make your own, pay attention to which size lack rack you get. IKEA strangely offers 2 slightly different sizes

22 inch


21 5/8 inch.

The 21-5/8” racks are the exact dimensions of server equipment.




To keep the tables from sliding off of each other, 3/16 inch holes were drilled in the bottom of each leg and 4 holes were drilled in the top corners. Metal pegs (courtesy of the IKEA) keep everything in alignment




21-58” IKEA LAC table = 9.99 x 5

16 metal pegs = free from IKEA parts department

Total = $49.95


Final Notes:

This obviously isn’t as sturdy as a real rack. 3 tables is probably the maximum anyone would trust with real equipment. (Assuming the servers aren’t heavy).

Checkout the IKEA Lack coffee table for full length servers


Chef Error


You are setting up a chef server, but when you run a knife command like “knife client list”, you get the following error:

ERROR: OpenSSL::PKey::RSAError: private key needed.

Here are the things to check:

Do your validation.pem and client.pem have valid data?

They should include PRIVATE keys (not public keys)

They should include the words —–END RSA PRIVATE KEY—–

Check that you followed this step of the chef instructions

sudo cp /etc/chef/validation.pem /etc/chef/webui.pem ~/.chef

Find current version of linux

Here is a trick to see what revision of Ubuntu you are running

echo `lsb_release -cs`

It will return something like “ precise” if you are running the precise penguin.

Add Virtualbox Repo to Linux

Instead of downloading an update to programs manually in linux, you can take advantage of the power of yum or apt-get. 


Here is how to add virtual box to the built in repositories. 



Change to root user

sudo su –

Create a new file called virtualbox.repo

nano /etc/yum.repos.d/virtualbox.repo

Add this text to the file then save

[virtualbox] name=Fedora $releasever – $basearch – VirtualBox baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/$releasever/$basearch enabled=1 gpgcheck=1 gpgkey=http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc


You can now update virtualbox by running

yum update

yum install virtual-box