I am trying to install VTK for Ubuntu 20.04 to enable several packages. I am not sure how to interpret the following message:

cmake -D PKG_MOLECULE=yes …/cmake
– Running check for auto-generated files from make-based build system
– Could NOT find FFMPEG (missing: FFMPEG_EXECUTABLE)
CMake Error at Modules/Packages/VTK.cmake:1 (find_package):
Could not find a package configuration file provided by “VTK” with any of
the following names:


Add the installation prefix of “VTK” to CMAKE_PREFIX_PATH or set “VTK_DIR”
to a directory containing one of the above files. If “VTK” provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:485 (include)

By default CMAKE will look for a CMake configuration file that would be bundled with the distribution and tells it how you import and link with the VTK libraries. To the best of my knowledge (I rarely use Ubuntu) this configuration file is part of the libvtk6-dev package in Ubuntu 20.22.

If you downloaded VTK as source and configured/installed it in a custom location, you will have to “educate” CMake where to find the corresponding file (i.e. either VTKConfig.cmake or vtk-config.cmake). This can be addressed by setting/modifying the environment variable CMAKE_MODULE_PATH to include that folder. Then during CMake configuration, it will be detected and used.

The alternative would be to revert to the traditional make build procedure and then edit the file lib/vtk/Makefile.lammps as needed. That can be tricky however, so the CMake options is recommended.

Where would I find the documentation to change the environmental variable?