几天前,我在 Ubuntu 16.04 上成功安装了 CUDA 8.0 工具包。然后今天运行“apt-get update”后,它突然开始说不再需要 cuda 8.0 工具包。
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
cuda-command-line-tools-8-0 cuda-core-8-0 cuda-cublas-8-0
cuda-cublas-dev-8-0 cuda-cudart-8-0 cuda-cudart-dev-8-0 cuda-cufft-8-0
cuda-cufft-dev-8-0 cuda-curand-8-0 cuda-curand-dev-8-0 cuda-cusolver-8-0
cuda-cusolver-dev-8-0 cuda-cusparse-8-0 cuda-cusparse-dev-8-0
cuda-documentation-8-0 cuda-driver-dev-8-0 cuda-license-8-0
cuda-misc-headers-8-0 cuda-npp-8-0 cuda-npp-dev-8-0 cuda-nvgraph-8-0
cuda-nvgraph-dev-8-0 cuda-nvml-dev-8-0 cuda-nvrtc-8-0 cuda-nvrtc-dev-8-0
cuda-samples-8-0 cuda-toolkit-8-0 cuda-visual-tools-8-0 freeglut3
freeglut3-dev nvidia-modprobe
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
现在,我害怕执行任何 apt-get upgrade 或 autoremove,因为担心整个安装会消失,所有配置都会变得混乱。我该怎么办?
答案1
这取决于您如何安装 CUDA。如果您运行了sudo apt-get install <some-package-which-depends-on-CUDA>
,并且该软件包被删除,那么 CUDA(自动安装的软件包)将自动变为可移除。简单的解决方法是将 CUDA 软件包标记为手动安装:
sudo apt-mark manual cuda-\*