9

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
Shervin Gharib
  • 279
  • 2
  • 9
  • 15
  • 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 06: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 09: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 http://askubuntu.com/questions/452556/how-to-set-up-nvidia-optimus-bumblebee-in-14-04, then reinstall cuda, please see here for bumblebee docs, http://bumblebee-project.org/install.html – Mark Kirby Oct 15 '15 at 10:24

1 Answers1

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 07: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 07:17