安裝cuda 9.0到阿里雲ubunut 16.04總是報告錯誤,嘗試了各種辦法也無解:
Installing the NVIDIA display driver...
The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly.
If you know that the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the '--kernel-source-path' flag.
===========
= Summary =
===========
Driver: Installation Failed
Toolkit: Installation skipped
Samples: Not Selected
Logfile is /tmp/cuda_install_24139.log
root@iZbp1hh9ibnz9gvys5xy8nZ:~# more /tmp/cuda_install_24139.log
Using more to view the EULA.
看看了日誌“/tmp/cuda_install_24139.log”才知道是編譯內核出錯,根本不是找不到kernel source!!!
換了最新的cuda10就編譯通過了,無fuck可說!
root@iZbp1hh9ibnz9gvys5xy8nZ:~# sh cuda_10.1.243_418.87.00_linux.run
===========
= Summary =
===========
Driver: Installed
Toolkit: Installed in /usr/local/cuda-10.1/
Samples: Not Selected
Please make sure that
- PATH includes /usr/local/cuda-10.1/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-10.1/lib64, or, add /usr/local/cuda-10.1/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-10.1/bin
To uninstall the NVIDIA Driver, run nvidia-uninstall
Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-10.1/doc/pdf for detailed information on setting up CUDA.
Logfile is /var/log/cuda-installer.log
root@iZbp1hh9ibnz9gvys5xy8nZ:~#
finally:
root@iZbp1hh9ibnz9gvys5xy8nZ:~# nvidia-smi
Sat Aug 31 23:52:06 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.00 Driver Version: 418.87.00 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| 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 P100-PCIE... Off | 00000000:00:08.0 Off | 0 |
| N/A 29C P0 25W / 250W | 0MiB / 16280MiB | 5% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+