2

我下载了 glfw 3.0.2 并尝试将其安装到 Ubuntu 13.04 上。(运行 Amd radeon 驱动程序 13.08 beta - 如果有任何相关性。)

我按照自述文件安装了xorg-devlibglu1-mesa-dev. 然后我运行'cmake'。然后'make'并得到这些错误:

$ make

Scanning dependencies of target glfw
[  2%] Building C object src/CMakeFiles/glfw.dir/clipboard.c.o
[  4%] Building C object src/CMakeFiles/glfw.dir/context.c.o
[  6%] Building C object src/CMakeFiles/glfw.dir/gamma.c.o
[  8%] Building C object src/CMakeFiles/glfw.dir/init.c.o
[ 10%] Building C object src/CMakeFiles/glfw.dir/input.c.o
[ 12%] Building C object src/CMakeFiles/glfw.dir/joystick.c.o
[ 14%] Building C object src/CMakeFiles/glfw.dir/monitor.c.o
[ 16%] Building C object src/CMakeFiles/glfw.dir/time.c.o
[ 18%] Building C object src/CMakeFiles/glfw.dir/window.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/x11_clipboard.c.o
[ 22%] Building C object src/CMakeFiles/glfw.dir/x11_gamma.c.o
[ 24%] Building C object src/CMakeFiles/glfw.dir/x11_init.c.o
[ 26%] Building C object src/CMakeFiles/glfw.dir/x11_joystick.c.o
[ 28%] Building C object src/CMakeFiles/glfw.dir/x11_monitor.c.o
[ 30%] Building C object src/CMakeFiles/glfw.dir/x11_time.c.o
[ 32%] Building C object src/CMakeFiles/glfw.dir/x11_window.c.o
[ 34%] Building C object src/CMakeFiles/glfw.dir/x11_unicode.c.o
[ 36%] Building C object src/CMakeFiles/glfw.dir/glx_context.c.o
/home/dean/Downloads/glfw-3.0.2/src/glx_context.c: In function ‘_glfwPlatformGetProcAddress’:
/home/dean/Downloads/glfw-3.0.2/src/glx_context.c:598:5: warning: pointer targets in passing argument 2 of ‘dlsym’ differ in signedness [-Wpointer-sign]
In file included from /home/dean/Downloads/glfw-3.0.2/src/glx_platform.h:41:0,
             from /home/dean/Downloads/glfw-3.0.2/src/x11_platform.h:52,
             from /home/dean/Downloads/glfw-3.0.2/src/internal.h:69,
             from /home/dean/Downloads/glfw-3.0.2/src/glx_context.c:28:
/usr/include/dlfcn.h:65:14: note: expected ‘const char * __restrict__’ but argument is of type ‘const GLubyte *’
Linking C static library libglfw3.a
[ 36%] Built target glfw
Scanning dependencies of target boing
[ 38%] Building C object examples/CMakeFiles/boing.dir/boing.c.o
make[2]: *** No rule to make target `/usr/lib/x86_64-linux-gnu/libGL.so', needed by `examples/boing'. Stop.
make[1]: *** [examples/CMakeFiles/boing.dir/all] Error 2
make: *** [all] Error 2
$

有什么帮助吗?

4

3 回答 3

1

这对我有用(使用 Ubuntu 13.10):

$ sudo ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so

这应该可以,但是如果您收到这样的错误:

ln: failed to create symbolic link ‘/usr/lib/x86_64-linux-gnu/libGL.so’: File exists

尝试删除符号链接或将其重命名为其他内容,然后重新尝试上述命令。就我而言,它指向一个未知文件libGL.so.1.2.0

于 2014-02-01T01:16:57.813 回答
1

检查 /usr/lib/x86_64-linux-gnu/libGL.so 是否存在。如果不是,请使用“apt-file search libGL.so”查找此文件所在的包。然后安装这个包。

您也可以尝试创建符号链接,因为该文件应该是指向其他一些 .so 文件(如 libGL.so.xy)的符号链接,其中 x 和 y 是版本号。

于 2013-09-10T08:44:46.277 回答
0

对于专有驱动程序,请参阅下面的更新和警告

尝试重新安装libgl1-mesa-dev并在没有人工干预libgl1-mesa-glx的情况下更新符号链接。libGL.so

sudo apt-get install --reinstall libgl1-mesa-dev libgl1-mesa-glx

这适用于:Debian Wheezy

更新和警告:

结果是重新安装libgl1-mesa-devlibgl1-mesa-glx更新 - 正如预期的那样 -libGL.so符号链接,但也破坏了我专有的 nvidia 驱动程序安装。重装驱动后一切正常。因此,在这种情况下,重新安装您的专有驱动程序可能是个好主意。

于 2014-07-14T20:27:29.817 回答