ld は libGL を見つけることができません (16.04LTS x64 + Nvidia ドライバー)

ld は libGL を見つけることができません (16.04LTS x64 + Nvidia ドライバー)

私はupdate-alternatives以前nvidia-367OpenGL のプロバイダーとして。

ldconfigを実行しました

すべてのシンボリックリンクが有効であり、正しいフォルダを指していることを確認しました。

root@laptop:/etc/ld.so.conf.d# ls -halt
lrwxrwxrwx   1 root root  41 sep.   2 18:59 i386-linux-gnu_EGL.conf -> /etc/alternatives/i386-linux-gnu_egl_conf
lrwxrwxrwx   1 root root  40 sep.   2 18:59 i386-linux-gnu_GL.conf -> /etc/alternatives/i386-linux-gnu_gl_conf
lrwxrwxrwx   1 root root  43 sep.   2 18:59 x86_64-linux-gnu_EGL.conf -> /etc/alternatives/x86_64-linux-gnu_egl_conf
lrwxrwxrwx   1 root root  42 sep.   2 18:59 x86_64-linux-gnu_GL.conf -> /etc/alternatives/x86_64-linux-gnu_gl_conf

root@laptop:/etc/alternatives# cat x86_64-linux-gnu_gl_conf 
/usr/lib/nvidia-367
/usr/lib32/nvidia-367

-Wl,--verboseしかし、プロジェクトのビルド中に g++ に渡すと、次のようになります。

[...]
attempt to open /home/lennart/Qt/5.7/5.7/gcc_64/lib/libGL.so failed
attempt to open /home/lennart/Qt/5.7/5.7/gcc_64/lib/libGL.a failed
attempt to open /usr/lib64/libGL.so failed
attempt to open /usr/lib64/libGL.a failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.9/libGL.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.9/libGL.a failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libGL.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libGL.a failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libGL.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libGL.a failed
attempt to open /lib/x86_64-linux-gnu/libGL.so failed
attempt to open /lib/x86_64-linux-gnu/libGL.a failed
attempt to open /lib/../lib/libGL.so failed
attempt to open /lib/../lib/libGL.a failed
attempt to open /usr/lib/x86_64-linux-gnu/libGL.so failed
attempt to open /usr/lib/x86_64-linux-gnu/libGL.a failed
attempt to open /usr/lib/../lib/libGL.so failed
attempt to open /usr/lib/../lib/libGL.a failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../libGL.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../libGL.a failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libGL.so failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libGL.a failed
attempt to open //lib/x86_64-linux-gnu/libGL.so failed
attempt to open //lib/x86_64-linux-gnu/libGL.a failed
attempt to open //usr/lib/x86_64-linux-gnu/libGL.so failed
attempt to open //usr/lib/x86_64-linux-gnu/libGL.a failed
attempt to open //usr/local/lib64/libGL.so failed
attempt to open //usr/local/lib64/libGL.a failed
attempt to open //lib64/libGL.so failed
attempt to open //lib64/libGL.a failed
attempt to open //usr/lib64/libGL.so failed
attempt to open //usr/lib64/libGL.a failed
attempt to open //usr/local/lib/libGL.so failed
attempt to open //usr/local/lib/libGL.a failed
attempt to open //lib/libGL.so failed
attempt to open //lib/libGL.a failed
attempt to open //usr/lib/libGL.so failed
attempt to open //usr/lib/libGL.a failed
attempt to open //usr/x86_64-linux-gnu/lib64/libGL.so failed
attempt to open //usr/x86_64-linux-gnu/lib64/libGL.a failed
attempt to open //usr/x86_64-linux-gnu/lib/libGL.so failed
attempt to open //usr/x86_64-linux-gnu/lib/libGL.a failed
[...]
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status

ご覧のとおり、ld config が nvidia-367 フォルダーを参照するように明確に構成されている場合でも、nvidia-367 フォルダーについてはどこにも言及されていません。

何が起こったのですか?

関連情報