一、问题描述
终端输入:
nvcc -V
提示:
Command 'nvcc' not found, but can be installed with:sudo apt install nvidia-cuda-toolkit
按照提示安装,终端输入 sudo apt install nvidia-cuda-toolkit,报错内容如下:
[sudo] password for usr:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:The following packages have unmet dependencies:nvidia-cuda-toolkit : Depends: nvidia-profiler (= 9.1.85-3ubuntu1) but it is not going to be installedDepends: nvidia-cuda-dev (= 9.1.85-3ubuntu1) but it is not going to be installedRecommends: nvidia-visual-profiler (= 9.1.85-3ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
二、解决方案
sudo apt-get install aptitude
sudo aptitude install nvidia-cuda-toolkit