Can't build VTK sample project: Missing module

This is the reason for the runtime error:

Are you running on a VM? Most VM’s don’t provide sufficient GPU support for OpenGL 3.2, which is required by VTK for rendering. But you can try forcing OpenGL to use software rendering, so that it doesn’t rely on the VM’s GPU.

Set this environment variable before running the example:

export LIBGL_ALWAYS_SOFTWARE=true

Older versions of VTK, e.g. VTK 7.1, did not require OpenGL 3.2 and were easier to run in VMs and over VNC remote connections.