CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfig.cmake:27 "/usr/lib/x86_64-linux-gnu/libEGL.so" missing

Hi, I am using Ubuntu 16.04. I installed the latest version of Nvidia driver (NVIDIA-Linux-x86_64-440.82.run) for my RTX2080Ti card. I installed some software packages but when I typed catkin_make, I got the following error. I have uninstalled and reinstalled the system over five times but still cannot get it resolved. Anybody knows how to fix this? From a post, it seems to be related to Nvidia driver. I tried the solution in:

https://askubuntu.com/questions/616065/the-imported-target-qt5gui-references-the-file-usr-lib-x86-64-linux-gnu-li

but it does not work. My setting is a bit different:

user@ubuntu:~/catkin_ws/build/CMakeFiles$ ls /usr/lib/x86_64-linux-gnu | grep -i libegl
libEGL_nvidia.so.0
libEGL_nvidia.so.440.82
libEGL.so
libEGL.so.1
libEGL.so.1.1.0

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfig.cmake:27 (message):

The imported target “Qt5::Gui” references the file

“/usr/lib/x86_64-linux-gnu/libEGL.so”

but this file does not exist. Possible reasons include:

  • The file was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and contained

“/usr/lib/x86_64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake”

but not all the files it references.

Call Stack (most recent call first):

/usr/lib/x86_64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:50 (_qt5_Gui_check_file_exists)

/usr/lib/x86_64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:72 (_qt5gui_find_extra_libs)

/usr/lib/x86_64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfig.cmake:158 (include)

/usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:99 (find_package)

open_manipulator/open_manipulator_control_gui/CMakeLists.txt:21 (find_package)

– Configuring incomplete, errors occurred!

See also “/home/user/catkin_ws/build/CMakeFiles/CMakeOutput.log”.

See also “/home/user/catkin_ws/build/CMakeFiles/CMakeError.log”.

Invoking “cmake” failed

Install libegl1-mesa-dev

Thanks. Tried that already. Based on:

I did:

user@ubuntu:~/catkin_ws$ sudo apt-get update -y
Hit:1 Index of /ubuntu xenial InRelease
Hit:2 Index of /ubuntu xenial-updates InRelease
Hit:3 Index of /ubuntu xenial-backports InRelease
Hit:4 http://packages.ros.org/ros/ubuntu xenial InRelease
Hit:5 Index of /ubuntu xenial-security InRelease
Reading package lists… Done
user@ubuntu:~/catkin_ws$ sudo apt-get install -y libegl1-mesa-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
libegl1-mesa-dev is already the newest version (18.0.5-0ubuntu0~16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 274 not upgraded.
user@ubuntu:~/catkin_ws$ locate libGL
/usr/lib/x86_64-linux-gnu/libGLEW.so.1.13
/usr/lib/x86_64-linux-gnu/libGLEW.so.1.13.0
/usr/lib/x86_64-linux-gnu/libGLEWmx.so.1.13
/usr/lib/x86_64-linux-gnu/libGLEWmx.so.1.13.0
/usr/lib/x86_64-linux-gnu/libGLU.so.1
/usr/lib/x86_64-linux-gnu/libGLU.so.1.3.1
/usr/lib/x86_64-linux-gnu/libhybris-egl/libGLESv2.so.2
/usr/lib/x86_64-linux-gnu/libhybris-egl/libGLESv2.so.2.0.0
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0