7

How can I install nvidia-smi? I installed CUDA and nvidia-352 driver but unfortunately nvidia-smi is not installed.

sudo apt-get update
sudo apt-get install nvidia-smi
E: Unable to locate package nvidia-smi
  • How did you install the driver ? PPA ? nvidia website ? or did you build it ? – Mark Kirby Oct 13 '15 at 14:49
  • @markkirby, I installed it like what nvidia site said. 'sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb' 'sudo apt-get update' 'sudo apt-get install cuda' – Shervin Gharib Oct 14 '15 at 14:49
  • 1
    Did you not also install the driver ? You must install both CUDA and the driver as nvidia-smi is packaged with the driver. – Mark Kirby Oct 15 '15 at 6:47
  • @markkirby no, I completely installed nvidia-352, Even I installed nvidia-340 but there is no nvidia-smi. My laptop has Intel 3000 and Nvidia 525M, is it important? – Shervin Gharib Oct 15 '15 at 9:36
  • Yes you have a hybrid GPU right ? Intel and Nvidia ? First remove everything you installed with sudo apt-get purge nvidia* Then see here for the driver instructions askubuntu.com/questions/452556/…, then reinstall cuda, please see here for bumblebee docs, bumblebee-project.org/install.html – Mark Kirby Oct 15 '15 at 10:24
7

nvidia-smi binary symlink created when you install the nvidia driver, as nvidia-340 in my case. Take a look:

darlene ➜   ls -la `which nvidia-smi` 

lrwxrwxrwx 1 root root 34 Mai 24 20:52 /usr/bin/nvidia-smi -> /etc/alternatives/x86_64-linux-gnu_nvidia_smi

darlene ➜   ls -la /etc/alternatives/x86_64-linux-gnu_nvidia_smi
lrwxrwxrwx 1 root root 34 Mai 24 20:52 /etc/alternatives/x86_64-linux-gnu_nvidia_smi -> /usr/lib/nvidia-340/bin/nvidia-smi

And the final binary comes from:

darlene ➜  dpkg -S /usr/lib/nvidia-340/bin/nvidia-smi
nvidia-340: /usr/lib/nvidia-340/bin/nvidia-smi
  • 1
    It's super weird, but I can't find this alternative, even after reinstalling multiples times. Maybe the nvidia driver install is silently aborting or failing halfway through? – fmoo Oct 23 '16 at 7:03
  • Wow, I've just learned something new - dpkg -S would not find symlinks (in case of alternatives). @fmoo - well, check all files with dpkg -L nvidia-390 (or whichever version you have), find nvidia-smi binary, and call it with absolute path, or add this location to your $PATH variable. – Tomasz Gandor Jan 15 '19 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.