我正在运行 Ubuntu 18.04,最近(大约一个月)通过运行文件安装安装了 CUDA 10.2,在使用稍微推荐的 .deb安装遇到很多麻烦之后。一切都很好:nvidia-smi 显示了 GPU 统计数据,并且我能够在 GPU 上运行我的并行代码。今天我启动了我的机器,软件中心建议了一些更新...这似乎只是libnvidia-compute-440软件包中的普通内容,但我没有太注意并安装了所有更新。之后,我的CUDA代码不起作用,我尝试nvidia-smi并得到了
Failed to initialize NVML: Driver/library version mismatch
我重新启动系统,仍然出现错误。我花了一个下午的时间在谷歌上搜索可能的解决方案,我想我能够找到问题的核心:运行dmesg |tail -4给出
NVRM: API mismatch: the client has the version 440.59, but
NVRM: this kernel module has the version 440.33.01. Please
NVRM: make sure that this kernel module and all NVIDIA driver
NVRM: components have the same version.
Run Code Online (Sandbox Code Playgroud)
我现在拥有的软件包版本libnvidia-compute-440确实是440.59,但我的驱动程序版本是440.33.01,如dmesg |grep nvidia(或我尝试过的类似命令)所示(参见第三行)
[ …Run Code Online (Sandbox Code Playgroud)