ubuntu18.04.05 裸机 安装显卡1080ti 1070ti显卡的驱动时报错
执行安装包错:
-
chmod -R 777 NVIDIA-Linux-x86_64-460.39.run
-
sudo ./NVIDIA-Linux-x86_64-460.39.run
ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding. Please consult the
NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.
OK
For some distributions, Nouveau can be disabled by adding a file in the modprobe configuration directory. Would you like nvidia-installer to attempt to create this modprobe file for
you?
Yes No
选择yes继续报错
WARNING: One or more modprobe configuration files to disable Nouveau are already present at: /etc/modprobe.d/nvidia-installer-disable-nouveau.conf. Please be sure you have rebooted your
system since these files were written. If you have rebooted, then Nouveau may be enabled for other reasons, such as being included in the system initial ramdisk or in your X
configuration file. Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.
OK
ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the
Linux driver download page at www.nvidia.com.
OK
【解决方案】:
参考:
https://askubuntu.com/questions/841876/how-to-disable-nouveau-kernel-driver
https://linuxconfig.org/how-to-disable-nouveau-nvidia-driver-on-ubuntu-18-04-bionic-beaver-linux
https://stackoverflow.com/questions/51789443/trying-to-install-cuda-9-2-on-ubuntu-18-04
Blacklist Nvidia nouveau driver
Open up terminal and enter the following linux commands:
-
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
-
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
Confirm the content of the new modprobe config file:
-
cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
-
blacklist nouveau
-
options nouveau modeset=0
Update kernel initramfs
Enter the following linux command to regenerate initramfs:
sudo update-initramfs -u
Reboot
All should be ready now. Reboot your system:
sudo reboot
!1,提示要安装cc 即gcc
sudo apt install gcc
!2,提示:
继续安装make工具
sudo apt install make
!3,提示:
WARNING: nvidia-installer was forced to guess the X library path '/usr/lib' and X module path '/usr/lib/xorg/modules'; these paths were not queryable from the system. If X fails to find
the NVIDIA X driver module, please install the `pkg-config` utility and the X.Org SDK/development package for your distribution and reinstall the driver.
OK
点击ok继续,就会成功,后面一步选择yes就会最终成功。
最后再装一个nvcc工具
sudo apt install nvidia-cuda-toolkit