# Could NOT find OpenGL (missing: OPENGL\_opengl\_LIBRARY OpenGL)

**URL:** https://discourse.vtk.org/t/could-not-find-opengl-missing-opengl-opengl-library-opengl/13152
**Category:** vtk.wasm
**Created:** [January 26, 2024, 10:40am UTC](https://discourse.vtk.org/t/could-not-find-opengl-missing-opengl-opengl-library-opengl/13152 "2024-01-26T10:40:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![leo](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/l/c2a13f/32.png) [@leo](https://discourse.vtk.org/u/leo)
#### Post date: [January 26, 2024, 10:40am UTC](https://discourse.vtk.org/t/could-not-find-opengl-missing-opengl-opengl-library-opengl/13152/1 "2024-01-26T10:40:57Z")

</div>

When compiling the vtk for WebAssembly , I encountered an error stating “Could NOT find OpenGL (missing: OPENGL\_opengl\_LIBRARY OpenGL) ”.I can’t solve it. Can someone help me?

```auto
The cmake command is : 
emcmake cmake \
-S /work/src \
-B /work/build-vtk-wasm \
-GNinja \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DVTK_ENABLE_LOGGING:BOOL=OFF \
-DVTK_ENABLE_WRAPPING:BOOL=OFF \
-DVTK_MODULE_ENABLE_VTK_hdf5:STRING=NO \
-DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2:STRING=DONT_WANT \
-DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2:STRING=DONT_WANT \
-DVTK_MODULE_ENABLE_VTK_RenderingCellGrid:STRING=NO \
-DVTK_MODULE_ENABLE_VTK_sqlite:STRING=NO \
-DCMAKE_INSTALL_PREFIX=/install

```

![image](https://discourse.vtk.org/uploads/default/original/2X/6/691e522f86adaf2cc19dfb729e1bec233c5f3d47.png)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [January 29, 2024, 9:18am UTC](https://discourse.vtk.org/t/could-not-find-opengl-missing-opengl-opengl-library-opengl/13152/2 "2024-01-29T09:18:37Z")

</div>

install `libOpenGL-dev` and other opengl related packages.

---

<div class="post-metadata">

### Author: ![leo](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/l/c2a13f/32.png) [@leo](https://discourse.vtk.org/u/leo)
#### Post date: [January 31, 2024, 2:55am UTC](https://discourse.vtk.org/t/could-not-find-opengl-missing-opengl-opengl-library-opengl/13152/3 "2024-01-31T02:55:37Z")

</div>

Thanks for the reply, I solved it, the problem was that I was using an older version of emsdk.
