18.04 nvidia driver / couldn't find libnvidia-ml.so library in your system.

1.nvidia-smi 報錯:

NVIDIA-SMI couldn't find libnvidia-ml.so library in your system. Please make sure that the NVIDIA Display Driver is properly installed and present in your system.
Please also try adding directory that contains libnvidia-ml.so to your system PATH

2.解決方法:

# BTW this is all in console mode (for me, alt+ctrl+F2)
# login + password as usual

# removing ALL nvidia software
$ sudo apt-get purge nvidia* 

# Checking what's left:
$ dpkg -l | grep nvidia
# Then I deleted the ones that showed up (mostly libnvidia-* but also xserver-xorg-video-nvidia-xxx`)
$ sudo apt-get purge libnvidia* xserver-xorg-video-nvidia-440 
$ sudo apt autoremove # clean it up

# now reinstall everything including nvidia-common
$ sudo apt-get nvidia-common

# find the right driver again
$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update
$ ubuntu-drivers devices
$ sudo apt-get install nvidia-driver-440 # the recommended one by ubuntu-drivers
$ update-initramfs -u # needed to do this so rebooting wouldn't lose configuration I think

$ sudo reboot 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章