我已经安装了最新的 NVIDIA 驱动程序并尝试链接EGL
库,但不知何故它不起作用。
g++ -o hello hello.cpp -lEGL
hello.cpp:2:23: fatal error: EGL/egl.h: No such file or directory
compilation terminated.
在这里你可以看到 EGL.so 在/usr/lib
ldconfig -p | grep EGL
libEGL_nvidia.so.0 (libc6,x86-64) => /usr/lib/nvidia-384/libEGL_nvidia.so.0
libEGL_nvidia.so.0 (libc6) => /usr/lib32/nvidia-384/libEGL_nvidia.so.0
libEGL.so.1 (libc6,x86-64) => /usr/lib/nvidia-384/libEGL.so.1
libEGL.so.1 (libc6) => /usr/lib32/nvidia-384/libEGL.so.1
libEGL.so (libc6,x86-64) => /usr/lib/nvidia-384/libEGL.so
libEGL.so (libc6) => /usr/lib32/nvidia-384/libEGL.so
nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.130 Driver Version: 384.130 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla K80 On | 00000000:00:1E.0 Off | 0 |
| N/A 34C P8 28W / 149W | 1MiB / 11439MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+