我试图在我的服务器上安装一些软件包,这需要对一些 CUDA 库进行一些更新。但现在我最终得到了
nvidia-smi: command not found
,
甚至我的 GPU 也像以前一样正常工作。那么可能出现什么问题,我该如何解决?一些信息:
操作系统:Ubuntu 16.04
$ lspci | grep VGA
04:00.0 VGA compatible controller: NVIDIA Corporation Device 1b06 (rev a1)
05:00.0 VGA compatible controller: NVIDIA Corporation Device 1b06 (rev a1)
08:00.0 VGA compatible controller: NVIDIA Corporation Device 1b06 (rev a1)
09:00.0 VGA compatible controller: NVIDIA Corporation Device 1b06 (rev a1)
0c:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 30)
84:00.0 VGA compatible controller: NVIDIA Corporation Device 1b06 (rev a1)
85:00.0 VGA compatible controller: NVIDIA Corporation Device 1b06 (rev a1)
88:00.0 VGA compatible controller: NVIDIA Corporation Device 1b06 (rev a1)
89:00.0 VGA compatible controller: NVIDIA Corporation Device 1b06 (rev a1)
$ dpkg -l | grep -E "nvidia-[0-9]{3}"
rc nvidia-390 390.59-0ubuntu0~gpu16. amd64 NVIDIA binary driver - version 390.59
rc nvidia-396 396.54-0ubuntu0~gpu16. amd64 NVIDIA binary driver - version 396.54
iU nvidia-440 440.33.01-0ubuntu1 amd64 NVIDIA binary driver - version 440.33.01
iU nvidia-440-dev 440.33.01-0ubuntu1 amd64 NVIDIA binary Xorg driver development files
$ grep "X Driver" /var/log/Xorg.0.log
[ 4612.223] (II) NVIDIA dlloader X Driver 396.54 Tue Aug 14 22:15:03 PDT 2018
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85
问题是,我可以nvidia-smi: command not found
在不安装任何其他 ppa 的情况下解决这个问题(在我尝试安装某个软件包之前没有发生过)吗apt purge nvidia-*
?这是一个共享服务器,所以我不想弄乱任何东西
答案1
nvidia-smi通过安装nvidia-utils,如下所示:
$ sudo apt-get install nvidia-smi
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package nvidia-smi is a virtual package provided by:
nvidia-utils-440 440.44-0ubuntu0~0.18.04.1
nvidia-utils-435 435.21-0ubuntu0.18.04.2
nvidia-utils-430 430.64-0ubuntu0~gpu18.04.1
nvidia-utils-415 415.27-0ubuntu0~gpu18.04.2
nvidia-utils-410 410.104-0ubuntu0~18.04.1
nvidia-utils-390 390.129-0ubuntu0~gpu18.04.1
You should explicitly select one to install.
E: Package 'nvidia-smi' has no installation candidate
因此,在您的情况下,您需要安装 nvidia-utils-440。