
# GPU驱动异常怎么办？
#### 问题描述
在GPU实例中，执行以下命令查看GPU使用情况，提示系统无法执行指定的程序、或文件路径不存在。
**nvidia-smi**
回显信息如下所示：
```
-bash: /bin/nvidia-smi: No such file or directory
```
或
```
nvidia-smi: command not found
```
#### 可能原因
云服务器驱动异常、没有安装驱动或者驱动被卸载。
#### 处理方法
- 如果未安装GPU驱动，请重新安装GPU驱动。 操作指导请参考：[安装GPU驱动](https://support.huaweicloud.com/usermanual-ecs/ecs_03_0177.html)
  
 
- 如果已安装驱动，但是驱动被卸载。 执行**history**，查看是否执行过卸载操作。
  进入/var/log目录，查看是否有nvidia-uninstall.log日志，如果有说明GPU驱动已被卸载，请重新安装GPU驱动。
  
- 如果已安装驱动，但是驱动状态异常。
  1. 卸载驱动。
     - 方法1：执行**nvidia-uninstall** 命令，卸载驱动。
       如果提示命令不存在可以执行[查询云服务器安装的驱动版本：whereis n...]卸载驱动。
       
     
     - 方法2：查询云服务器安装的驱动版本：whereis nvidia
       图1查询安装的驱动版本   
       ![](https://support.huaweicloud.com/trouble-ecs/zh-cn_image_0000001141069507.png "点击放大")
       根据查询的驱动版本从[NVIDIA官网](https://www.nvidia.com/Download/Find.aspx?lang=en-us)下载驱动包（此处重新下载驱动包是为了执行卸载动作，且后续重新安装驱动时需要此安装包）。
       以驱动版本nvidia-396.44为例，执行**sh NVIDIA-Linux-x86_64-396.44.run --uninstall**，卸载驱动
       
      
  
  2. 重装驱动。 操作指导请参考：[安装GPU驱动](https://support.huaweicloud.com/usermanual-ecs/ecs_03_0177.html)
     
   
 
