MIXIAOXIN / ProjectNote

Note
0 stars 0 forks source link

after CUDA install:nvidia-smi 后:Failed to initialize NVML: Driver/library version mismatch #2

Closed MIXIAOXIN closed 2 years ago

MIXIAOXIN commented 4 years ago

原因:安装cuda的时候,更改了原来的显卡驱动(原来的显卡驱动是nvidia-430,安装cuda时被更改为nvidia-418)。 另外的表现:卡在ubuntu的登陆界面,循环登陆。

解决方案:关闭图形界面,重新安装显卡驱动。

  1. CLTR+ALT+F1进入tty非图形界面

  2. 用户名+密码登陆

  3. sudo service lightdm stop

  4. sudo apt-get --purge remove nvidia*

  5. sudo ./NVIDIA-Linux-x86_64-430.58.run -no-x-check -no-nouveau-check -no-opengl-files 6 .The distribution-provided pre-install script failed! Are you sure you want to continue? 选择 yes 继续。 Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later? 选择 No 继续。 问题没记住,选项是:install without signing 问题大概是:Nvidia's 32-bit compatibility libraries? 选择 No 继续。 Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up. 选择 Yes 继续(但是我选的是no啊)

  6. 安装完成后:sudo service lightdm restart 8.登陆 nvidia-smi

  7. reboot