Fedora 39でdnf update --refreshを使用してnvidiaドライバを更新しようとすると、エラーがたくさん発生します。

Fedora 39でdnf update --refreshを使用してnvidiaドライバを更新しようとすると、エラーがたくさん発生します。

約1〜2週間前にカーネルを更新しようとしましたが、誤ってNVIDIAドライバが破損しています。起動するたびに、「NVIDIAカーネルモジュールが破損しています。nouveauに戻っています」というメッセージまたは類似のメッセージが表示されます。調べてみると、いくつかのソースでsudo dnf update --refreshを指示しましたが、そうすると次のような結果が出ました。

 Problem 1: package xorg-x11-drv-nvidia-power-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires xorg-x11-drv-nvidia(x86-64) = 3:550.67, but none of the providers can be installed
  - cannot install the best update candidate for package xorg-x11-drv-nvidia-power-3:550.54.14-1.fc39.x86_64
  - package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered out by modular filtering
  - package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
 Problem 2: package akmod-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires nvidia-kmod-common >= 3:550.67, but none of the providers can be installed
  - cannot install the best update candidate for package akmod-nvidia-3:535.129.03-1.fc39.x86_64
  - package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered out by modular filtering
  - package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
 Problem 3: package nvidia-kmod-common-3:550.54.15-1.fc39.noarch from cuda-fedora39-x86_64 requires nvidia-kmod = 3:550.54.15, but none of the providers can be installed
  - package nvidia-driver-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 requires nvidia-kmod-common = 3:550.54.15, but none of the providers can be installed
  - package kmod-nvidia-open-dkms-3:550.54.14-1.fc39.x86_64 from @System conflicts with kmod-nvidia-latest-dkms provided by kmod-nvidia-latest-dkms-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64
  - cannot install the best update candidate for package xorg-x11-drv-nvidia-3:550.54.14-1.fc39.x86_64
  - cannot install the best update candidate for package kmod-nvidia-open-dkms-3:550.54.14-1.fc39.x86_64
  - package kmod-nvidia-open-dkms-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
 Problem 4: package xorg-x11-drv-nvidia-power-3:550.54.14-1.fc39.x86_64 from @System requires xorg-x11-drv-nvidia(x86-64) = 3:550.54.14, but none of the providers can be installed
  - package xorg-x11-drv-nvidia-3:550.54.14-1.fc39.x86_64 from @System requires nvidia-modprobe(x86-64) = 3:550.54.14, but none of the providers can be installed
  - problem with installed package xorg-x11-drv-nvidia-power-3:550.54.14-1.fc39.x86_64
  - cannot install both nvidia-modprobe-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 and nvidia-modprobe-3:550.54.14-1.fc39.x86_64 from @System
  - cannot install both nvidia-modprobe-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 and nvidia-modprobe-3:550.54.14-1.fc39.x86_64 from cuda-fedora39-x86_64
  - package xorg-x11-drv-nvidia-power-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires xorg-x11-drv-nvidia(x86-64) = 3:550.67, but none of the providers can be installed
  - package xorg-x11-drv-nvidia-power-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:550.67, but none of the providers can be installed
  - cannot install the best update candidate for package nvidia-modprobe-3:550.54.14-1.fc39.x86_64
  - package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered out by modular filtering
  - package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
 Problem 5: problem with installed package akmod-nvidia-3:535.129.03-1.fc39.x86_64
  - package akmod-nvidia-3:535.129.03-1.fc39.x86_64 from @System requires xorg-x11-drv-nvidia-kmodsrc = 3:535.129.03, but none of the providers can be installed
  - package akmod-nvidia-3:535.129.03-1.fc39.x86_64 from rpmfusion-nonfree requires xorg-x11-drv-nvidia-kmodsrc = 3:535.129.03, but none of the providers can be installed
  - cannot install both xorg-x11-drv-nvidia-kmodsrc-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver and xorg-x11-drv-nvidia-kmodsrc-3:535.129.03-2.fc39.x86_64 from @System
  - cannot install both xorg-x11-drv-nvidia-kmodsrc-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver and xorg-x11-drv-nvidia-kmodsrc-3:535.129.03-2.fc39.x86_64 from rpmfusion-nonfree
  - package akmod-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires nvidia-kmod-common >= 3:550.67, but none of the providers can be installed
  - package akmod-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates requires nvidia-kmod-common >= 3:550.67, but none of the providers can be installed
  - cannot install the best update candidate for package xorg-x11-drv-nvidia-kmodsrc-3:535.129.03-2.fc39.x86_64
  - package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered out by modular filtering
  - package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
 Problem 6: problem with installed package kmod-nvidia-open-dkms-3:550.54.14-1.fc39.x86_64
  - package kmod-nvidia-open-dkms-3:550.54.14-1.fc39.x86_64 from @System requires nvidia-kmod-common = 3:550.54.14, but none of the providers can be installed
  - package kmod-nvidia-open-dkms-3:550.54.14-1.fc39.x86_64 from cuda-fedora39-x86_64 requires nvidia-kmod-common = 3:550.54.14, but none of the providers can be installed
  - package nvidia-kmod-common-3:550.54.14-1.fc39.noarch from cuda-fedora39-x86_64 requires nvidia-driver = 3:550.54.14, but none of the providers can be installed
  - cannot install both nvidia-driver-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 and nvidia-driver-3:550.54.14-1.fc39.x86_64 from cuda-fedora39-x86_64
  - package xorg-x11-drv-nvidia-3:550.54.14-1.fc39.x86_64 from @System requires nvidia-settings(x86-64) = 3:550.54.14, but none of the providers can be installed
  - package nvidia-settings-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 requires nvidia-driver(x86-64) = 3:550.54.15, but none of the providers can be installed
  - cannot install both nvidia-settings-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 and nvidia-settings-3:550.54.14-1.fc39.x86_64 from @System
  - cannot install both nvidia-settings-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 and nvidia-settings-3:550.54.14-1.fc39.x86_64 from cuda-fedora39-x86_64
  - cannot install the best update candidate for package nvidia-settings-3:550.54.14-1.fc39.x86_64
==============================================================================================================================================================================================================
 Package                                                 Architecture                       Version                                         Repository                                                   Size
==============================================================================================================================================================================================================
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 kmod-nvidia-latest-dkms                                 x86_64                             3:550.54.15-1.fc39                              cuda-fedora39-x86_64                                         40 M
 nvidia-driver                                           x86_64                             3:550.54.14-1.fc39                              cuda-fedora39-x86_64                                        126 M
 nvidia-driver                                           x86_64                             3:550.54.15-1.fc39                              cuda-fedora39-x86_64                                        126 M
 nvidia-modprobe                                         x86_64                             3:550.54.15-1.fc39                              cuda-fedora39-x86_64                                         30 k
 nvidia-settings                                         x86_64                             3:550.54.15-1.fc39                              cuda-fedora39-x86_64                                        822 k
 xorg-x11-drv-nvidia-kmodsrc                             x86_64                             3:550.67-1.fc39                                 rpmfusion-nonfree-nvidia-driver                              44 M
Skipping packages with broken dependencies:
 akmod-nvidia                                            x86_64                             3:550.67-1.fc39                                 rpmfusion-nonfree-updates                                    40 k
 nvidia-kmod-common                                      noarch                             3:550.54.14-1.fc39                              cuda-fedora39-x86_64                                         12 k
 nvidia-kmod-common                                      noarch                             3:550.54.15-1.fc39                              cuda-fedora39-x86_64                                         12 k
 xorg-x11-drv-nvidia-power                               x86_64                             3:550.67-1.fc39                                 rpmfusion-nonfree-nvidia-driver                             103 k

Transaction Summary
==============================================================================================================================================================================================================
Skip  10 Packages

Nothing to do.
Complete!

示されているようにして、--best --allowerasingを追加してみてください。

 Problem 1: cannot install the best update candidate for package xorg-x11-drv-nvidia-power-3:550.54.14-1.fc39.x86_64
  - problem with installed package xorg-x11-drv-nvidia-power-3:550.54.14-1.fc39.x86_64
  - package xorg-x11-drv-nvidia-power-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires xorg-x11-drv-nvidia(x86-64) = 3:550.67, but none of the providers can be installed
  - package xorg-x11-drv-nvidia-power-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:550.67, but none of the providers can be installed
  - package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered out by modular filtering
  - package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
 Problem 2: problem with installed package akmod-nvidia-3:535.129.03-1.fc39.x86_64
  - cannot install the best update candidate for package akmod-nvidia-3:535.129.03-1.fc39.x86_64
  - package akmod-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires nvidia-kmod-common >= 3:550.67, but none of the providers can be installed
  - package akmod-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates requires nvidia-kmod-common >= 3:550.67, but none of the providers can be installed
  - package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered out by modular filtering
  - package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages)

カーネルがクラッシュした後にCUDAコードを実行することはできないので、これをすべて行います。 NVIDIAのベクトル追加例を実行しようとしましたが、次のエラーが発生しました。

Failed to allocate device vector A (error code system has unsupported display driver / cuda driver combination)!

私のベクトル出力CUDAプログラムを実行しようとすると0のみ出力されます。言うまでもなく、CUDAは機能しません。 CUDAツールキットを確認して再インストールまでしたので大丈夫でしょう。私が知っているのは、この問題を解決するために何をすべきかわかりません。最終的な目標は、CUDAコードを再実行することです。

私が試したこと:

  • CUDA ツールキットを再インストールします。
  • sudo dnfアップデート - 更新
  • sudo dnf 更新 --refresh --best --allowerasing
  • NVIDIAカーネルモジュールに署名します(どこかは覚えていませんが、どこかで試してみることができるので従いました。このガイド)
  • ドライバを完全に再インストールしてください(次へ)。このガイド)
  • 以前のカーネルに戻る

ほとんどほとんど効果がありません。

ベストアンサー1

オプション1


--allowerasing一部のパッケージが満たされていない依存関係がある場合は、追加オプションを使用して再実行するまでアップグレードは続行されません。これは、更新リポジトリがまだリリースされていないサードパーティのリポジトリからインストールされているパッケージで頻繁に発生します。出力を慎重に検討し、どのパッケージが削除されているかを確認してください。これらのどれもシステム機能には必要ありませんが、一部は生産性にとって重要です。

  • 依存関係が満たされていない場合、コマンドラインに --best オプションを追加すると、より詳細な情報が表示されることがあります。
  • 再実行する前に特定のパッケージを手動で削除/インストールするには、dnfコマンドラインオプションをdnf system-upgrade download使用してこれらのタスクを実行することをお勧めします。--setopt=keepcache=1それ以外の場合は、操作後にパッケージ全体のキャッシュが削除されるため、すべてのパッケージを再ダウンロードする必要があります。

https://fedoraproject.org/wiki/DNF_system_upgrade

源泉

オプション2


sudo dnf データベースキャッシュの消去

ストレージメタデータによって生成されたキャッシュファイルを削除します。これにより、次にDNFが実行されるとキャッシュファイルが再生成されます。 sudo dnf期限切れキャッシュクリーンアップ

ストレージメタデータを期限切れとしてマークします。 DNF は、次に各ストレージが使用されるとキャッシュを再検証します。 sudo dnf クリーンアップメタデータ

ストレージメタデータを削除します。 DNF はこれらのファイルを使用して、ソフトウェアパッケージのリモート可用性を決定します。このオプションを使用すると、次にDNFが実行されるとすべてのメタデータがダウンロードされます。

sudo dnf - リフレッシュのインストールNvidiaドライバ

源泉

おすすめ記事