CMake could not find OpenGL in Ubuntu

后端 未结 2 394
梦如初夏
梦如初夏 2021-01-07 16:44

I want to install VTK in Ubuntu. CMake sends me this error :

CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (

相关标签:
2条回答
  • 2021-01-07 17:28

    EDIT Following the answer, we don't need to install freeglut (SDK for windows) but installing mesa is enough.

    You can install mesa an implementation of OpenGL. See indications in the answer.

    Therefore, if you have an error such that:

    Could NOT find OpenGL

    Then, you want to install libgl1-mesa-dev. With debian-based system:

    sudo apt-get install libgl1-mesa-dev

    For an error, such that:

    Could NOT find OpenGL (missing: EGL)

    Then, you want to install libgl1-mesa-dev. With debian-based system:

    sudo apt-get install libegl1-mesa-dev

    0 讨论(0)
  • 2021-01-07 17:39

    You don't need any version of GLUT to satisfy a dependency on OpenGL. What you need is OpenGL headers and libraries. In Ubuntu they are installed with the libgl1-mesa-dev package.

    To get the EGL build dependencies, replace the gl1 part of package name with egl1.

    0 讨论(0)
提交回复
热议问题