Qt 5.2 clean installation

After installing Qt 5.2 on Debian 7.3 (wheezy) (amd64 O.S.) from http://download.qt-project.org/official_releases/online_installers/1.5/qt-linux-opensource-1.5.0-x64-online.run I opened Qt Creator and compiled their “Application Example” application example 🙂 and I got this error:

fatal error: GL/gl.h: No such file or directory

To fix it I had to run as root:

apt-get install x11proto-gl-dev mesa-common-dev

But then I got this error:

/usr/bin/ld: cannot find -lGL

To solve this one I had to(run as root):

apt-get install freeglut3 freeglut3-dev