To make sure you have GLUT installed, you should try
sudo apt-get install freeglut3
which will install GLUT on Ubuntu 12.04. If it is not installed, it will install it, otherwise it will tell you that
freeglut3-dev is already the newest version.
If after that it still doesn't work, you can link it here: /usr/lib/i386-linux-gnu/libglut.so.3 (which is the location of the library in Ubuntu 12.04 32bit ) with something like
sudo ln -s /usr/lib/i386-linux-gnu/libglut.so.3 /usr/lib/libglut.so
source share