Debian(11)にCUDAツールキット(11.5)をインストールする

Debian(11)にCUDAツールキット(11.5)をインストールする

Debian(11) に CUDA Toolkit(11.5) をインストールする方法は次のように整理されています。開発者.nvidia.com/cuda-downloads

ただし、deb(ローカル)メソッドを使用するか、deb(ネットワーク)メソッドを使用するかにかかわらず、小さな依存関係の問題が発生しているようです。私はNVIDIA関連のパッケージバージョンをaptインストールしたいのですが、代わりにバージョンをインストールする必要があるという印象を受けました。470495

実行すると、sudo apt install cuda次のようになります。

Reading package lists... Done
Building dependency tree... Done
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:
 cuda-drivers-495 : Depends: nvidia-driver (>= 495.29.05) but it is not going to be installed
                    Depends: libcuda1 (>= 495.29.05) but it is not going to be installed
                    Depends: libnvcuvid1 (>= 495.29.05) but it is not going to be installed
                    Depends: libnvidia-allocator1 (>= 495.29.05) but 470.74-1 is to be installed
                    Depends: libnvidia-compiler (>= 495.29.05) but 470.74-1 is to be installed
                    Depends: libnvidia-encode1 (>= 495.29.05) but it is not going to be installed
                    Depends: libnvidia-fbc1 (>= 495.29.05) but it is not going to be installed
                    Depends: libnvidia-opticalflow1 (>= 495.29.05) but it is not going to be installed
                    Depends: libnvidia-ptxjitcompiler1 (>= 495.29.05) but 470.74-1 is to be installed
                    Depends: libnvoptix1 (>= 495.29.05) but it is not going to be installed
                    Depends: libxnvctrl-dev (>= 495.29.05) but it is not going to be installed
                    Depends: nvidia-cuda-mps (>= 495.29.05) but 470.74-1 is to be installed
                    Depends: nvidia-detect (>= 495.29.05) but 470.74-1 is to be installed
                    Depends: nvidia-libopencl1 (>= 495.29.05) but 470.74-1 is to be installed
                    Depends: nvidia-opencl-common (>= 495.29.05)
                    Depends: nvidia-opencl-icd (>= 495.29.05) but it is not going to be installed
                    Depends: nvidia-smi (>= 495.29.05) but it is not going to be installed
                    Depends: nvidia-xconfig (>= 495.29.05) but 470.57.02-1 is to be installed
                    Depends: nvidia-modprobe (>= 495.29.05)
 libcufile-11-5 : Depends: liburcu6 but it is not installable
 nvidia-libopencl1 : Conflicts: libopencl1
                     Conflicts: libopencl1:i386
                     Recommends: nvidia-opencl-icd but it is not going to be installed or
                                 opencl-icd
 ocl-icd-libopencl1 : Conflicts: libopencl1
 ocl-icd-libopencl1:i386 : Conflicts: libopencl1
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

たとえば、バージョンを手動で指定していくつかの依存関係をインストールしましたが、sudo apt install nvidia-settings=495.29.05-1これは無限のプロセスのようです。

注:実行すると、sudo apt-cache policy nvidia-driver次のようになります。

nvidia-driver:
  Installed: (none)
  Candidate: 470.74-1
  Version table:
     495.29.05-1 500
        500 https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64  Packages
        500 file:/var/cuda-repo-debian11-11-5-local  Packages
     470.74-1 990
        990 http://deb.debian.org/debian testing/non-free amd64 Packages

どのように進むべきかを知っている人はいますか?

現在私の/etc/apt/sources.listは次のようになります。

deb https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/ /
# deb-src https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/ /
deb http://deb.debian.org/debian/ bookworm contrib
deb http://deb.debian.org/debian/ testing main contrib non-free

PS:「runfile(local)」メソッドも試しましたが、インストールするコンポーネントをsudo sh cuda_11.5.0_495.29.05_linux.run実行して選択すると、詳細なしで「インストールに失敗しました」というメッセージが表示されます。

ベストアンサー1

私はDebian 12(テスト)でこの問題に直面しました。 liburcu6の.debをダウンロードして問題を解決しました。 https://packages.debian.org/bullseye/liburcu6 そしてインストールしてみてください

sudo apt install ./Downloads/liburcu6_0.12.2-1_amd64.deb

その後、再実行するとうまくいきsudo apt-get -y install cudaましたね。最新の Debian バージョンに liburcu6 が含まれていない理由について、より深い洞察力はありません。

おすすめ記事