所以,15.04 x64,剛剛安裝。
我以舊方式安裝了 nvidia 二進位(控制台,關閉 lightdm),因為我收到有關 DRI2 身份驗證的錯誤。
然後我想建立 nv opengl 範例,他們說這些是先決條件:
sudo apt-get install g++ binutils-gold xorg-dev libglu1-mesa-dev
但後來它抱怨 libGL.so 丟失,所以穀歌搜尋我嘗試安裝所有這些東西:
61 sudo apt-get install libgl1-mesa-dev
62 sudo apt-get autoremove
63 make
64 sudo apt-get install mesa-common-dev
65 sudo apt-get install freeglut3-dev freeglut3
66 make
67 sudo apt-get install build-essential
然後,我不知道怎麼回事,我最終卸載了 nvidia 驅動程式! (中間還有一個自動刪除,其中包含一些 nv 內容,也許這弄亂了一切)
不管怎樣,在再次重新安裝 nv 二進位後,我嘗試建立 vogl (一個 GL 偵錯工具),然後再次得到
elect@elect-desktop:~/NetBeansProjects/vogl/vogl_build/release64$ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_X64=On ../..
cmake options:
-DCMAKE_BUILD_TYPE='Release': Build debug or release. (Debug|Release)
-DVOGLTEST_LOAD_LIBVOGLTRACE='': glitest will load libvogltrace.so manually (don't implictly link against libgl.so). (On|Off)
-DVOGLTRACE_NO_PUBLIC_EXPORTS='OFF': Don't define any public GL exports in libvogltrace.so. (On|Off)
-DVOGL_ENABLE_ASSERTS='OFF': Enable assertions in all voglcore builds (including release). (On|Off)
-DCMAKE_VERBOSE='OFF': Spew cmake project options. (On|Off)
-DBUILD_X64='On': Build 32 or 64-bit. (On|Off)
-DWITH_ASAN='OFF': Build with Address sanitizer. (On|Off)
-DUSE_TELEMETRY='OFF': Build with Telemetry. (On|Off)
-DUSE_MALLOC='': Use system malloc (not STB Malloc). (On|Off)
Not forcing assertions to be enabled (VOGL_ENABLE_ASSERTS=FALSE)
libvogltrace.so will define GL/GLX public exports
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:32 (_qt5_Gui_check_file_exists)
/usr/lib/x86_64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:54 (_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:100 (find_package)
/usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:26 (find_package)
src/vogleditor/CMakeLists.txt:14 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/elect/NetBeansProjects/vogl/vogl_build/release64/CMakeFiles/CMakeOutput.log".
See also "/home/elect/NetBeansProjects/vogl/vogl_build/release64/CMakeFiles/CMakeError.log".
elect@elect-desktop:~/NetBeansProjects/vogl/vogl_build/release64$ ls /usr/lib/x86_64-linux-gnu | grep -i libegl
libEGL.so
libEGL.so.1
libEGL.so.346.59
怎麼了,夥計們?
答案1
無論如何,讓我總結一下這個故事。
$ ls /usr/lib/x86_64-linux-gnu | grep -i libegl
libEGL.so
libEGL.so.1
libEGL.so.346.59
ls -l /usr/lib/x86_64-linux-gnu/libEGL.so
lrwxrwxrwx 1 root root 18 mar 30 17:10 /usr/lib/x86_64-linux-gnu/libEGL.so -> mesa-egl/libEGL.so
和
lrwxrwxrwx 1 root root 15 mar 30 17:10 /usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so -> libEGL.so.1.0.0
但我沒有任何 libEGL.so.1.0.0..
所以看起來這是來自 mesa 和 nv 二進位檔案的一團糟
我第三次安裝了二進位檔案並且它有效。
另一個可能的解決方案是 Angelo Geels 的解決方案(在評論中):
sudo rm /usr/lib/x86_64-linux-gnu/libEGL.so; sudo ln /usr/lib/x86_64-linux-gnu/libEGL.so.1 /usr/lib/x86_64-linux-gnu/libEGL.so