Build nvgstcapture-1.0 on jetson tx1 failed: "fatal error: EGL/egl.h: No such file or directory"


I met an error when building nvgstcapture-1.0:

ubuntu@tegra-ubuntu:~/nvgstapp/v27.1/nvgstapps_src/nvgst_sample_apps/nvgstcapture-1.0$ gcc nvgstcapture.c -o nvgstcapture-1.0 $(pkg-config --cflags --libs gstreamer-1.0 gstreamer-plugins-base-1.0 gstreamer-pbutils-1.0)
In file included from nvgstcapture.c:25:0:
nvgstcapture.h:38:21: fatal error: EGL/egl.h: No such file or directory
compilation terminated.

I thought maybe OpenGL should be installed first, but after I installed OpenGL the error is still there.

The source code nvgstapps_src.tbz2 is got from r27.1.0_sources.tbz2 which is downloaded from

Please tell me how to fix this issue.

BTW, the same issue happened on jetson tx2 too.

Hi yafei,
Looks like you do not do ‘sudo apt-get install libegl1-mesa-dev’. Please refer to README in the source package.

hi, DaneLLL
I resolved this issue according your help.

But there is still another issue the same as below:

May I know when you will release the new version to fix this?

Best Regards.