Trouble installing VTK on ubuntu

Hello, when I try to run “make install” for VTK I get the following error:

[ 53%] Built target ImagingMath

make[2]: *** No rule to make target ‘/usr/lib/x86_64-linux-gnu/libGLX.so’, needed by ‘lib/libvtkglew-9.0.so.9.0.0’. Stop.
CMakeFiles/Makefile2:7758: recipe for target ‘ThirdParty/glew/vtkglew/CMakeFiles/glew.dir/all’ failed
make[1]: *** [ThirdParty/glew/vtkglew/CMakeFiles/glew.dir/all] Error 2
Makefile:140: recipe for target ‘all’ failed
make: *** [all] Error 2

Obviously the first thing I thought was that /usr/lib/x86_64-linux-gnu/libGLX.so cannot be found, however when I run “locate libGLX.so” it returns

/usr/lib/x86_64-linux-gnu/libGLX.so
/usr/lib/x86_64-linux-gnu/libGLX.so.0

(i.e., exactly where it should be). Does anyone have any ideas?

Hello, kland,

The result of locate shows only that you have the runtime libraries in your system to run OpenGL programs. To develop or compile software that use OpenGL, you need to install de so-called devel packages, which install the headers (.h files), link-time libraires (.a files), CMake find-<module>.cmake files, etc. This rationale applies to other dependencies of VTK (e.g. Qt if you enable Qt modules).

You can try this prior to configuring and building VTK:
sudo apt-get install freeglut3 freeglut3-dev libglew1.5 libglew1.5-dev libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev (from: https://askubuntu.com/questions/11378/how-do-i-set-up-an-opengl-programming-environment).

cheers,

Paulo