CMake Error at CMake/vtkModule.cmake:4579 (message):
Could not find the OpenGL external dependency.
Call Stack (most recent call first):
CMake/vtkModule.cmake:5173 (vtk_module_find_package)
Utilities/OpenGL/CMakeLists.txt:58 (vtk_module_third_party_external)
I tried to install OpenGL, but it depends on other packages. I tried to go down the chain in terms of dependencies, but unfortunately, cannot install OpenGL even after multiple attempts. I have implemented the following codes to install OpenGL and its various dependencies:
解决方法:
- sudo apt-get install libegl1-mesa-dev
- FindOpenGL.cmake
- sudo apt-get install libgl1-mesa-dev
- sudo apt update
- sudo apt-get install freeglut3-dev
- sudo apt reinstall freeglut3-dev
- # sudo apt --fix-broken install
- # sudo apt --fix-missing
- sudo apt-get upgrade
- sudo apt-get install mesa-utils
- sudo apt install libgtkglext1
参考:Building VTK in Ubuntu 21.04. OpenGL missing. - Support - VTK