A quick and easy way would be to type the following in one line with single spaces in the Terminal.
This way of installing OpenGL and SDL libraries only applies to Ubuntu.

sudo apt-get install
nvidia-glx-new-dev
libglew1.4-dev
libsdl1.2-dev
libsdl-ttf2.0-dev
libsdl-image1.2-dev
libsdl-mixer1.2-dev