yasuです。
最近もっぱらエンコードマシンになっている、我が家のDesktop版Ubuntu 24.04 LTSを導入しているPCでパッケージの更新をしたら、nVidiaドライバが悪さしててエラーになったので、その際の対応方法を備忘録として残しておきます。
目次(クリックで開閉)
今回作業したPCの構成
| パーツ | 型番・スペック |
|---|---|
| マザーボード | ASRock B460M Streal Legend |
| CPU | Intel Core i7 10700 |
| メモリ | CFD W4U3200CX1-8G✕2 (16GB) |
| SSD | Western Digital BLUE SN550 (500GB) |
| HDD | Western Digital WD60EZAZ (6TB) |
| グラフィックボード | ZOTAC GAMING GeForce RTX 2070 Blower 8GB(GDDR6) |
| ケース | Thermaltake Versa H18 |
| ネットワークカード | NB-INT-X520DA1-S |
| 電源 | CORSAIR CX450M |
| 接続しているディスプレイ | PHILIPS 278E1A/11 |
sudo apt dist-upgradeの実行結果
sudo apt dist-upgrade を実施したら、下記エラーが発生。
取得:1 https://packages.microsoft.com/repos/code stable/main amd64 code amd64 1.109.1-1770669914 [117 MB]
取得:2 https://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 145.0.7632.45-1 [121 MB]
取得:3 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 language-pack-gnome-ja all 1:24.04+20260127 [1,916 B]
取得:4 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 language-pack-gnome-ja-base all 1:24.04+20260127 [1,350 kB]
取得:5 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64 libnvidia-egl-gbm1 1.1.3-1ubuntu1 [13.3 kB]
取得:6 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64 libnvidia-egl-gbm1 1.1.3-1ubuntu1 [14.4 kB]
取得:7 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 language-pack-ja all 1:24.04+20260127 [1,896 B]
取得:8 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 language-pack-ja-base all 1:24.04+20260127 [1,648 kB]
取得:9 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 python-apt-common all 2.7.7ubuntu5.2 [20.6 kB]
取得:10 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 python3-apt amd64 2.7.7ubuntu5.2 [169 kB]
取得:11 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 alsa-ucm-conf all 1.2.10-1ubuntu5.9 [67.8 kB]
取得:12 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 ldap-utils amd64 2.6.10+dfsg-0ubuntu0.24.04.1 [153 kB]
取得:13 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libldap2 amd64 2.6.10+dfsg-0ubuntu0.24.04.1 [198 kB]
取得:14 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libboost-iostreams1.83.0 amd64 1.83.0-2.1ubuntu3.2 [260 kB]
取得:15 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libboost-thread1.83.0 amd64 1.83.0-2.1ubuntu3.2 [276 kB]
取得:16 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libboost-locale1.83.0 amd64 1.83.0-2.1ubuntu3.2 [413 kB]
取得:17 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libldap-common all 2.6.10+dfsg-0ubuntu0.24.04.1 [32.9 kB]
242 MB を 5秒 で取得しました (53.1 MB/s)
パッケージを事前設定しています ...
(データベースを読み込んでいます ... 現在 272075 個のファイルとディレクトリがインストールされています。)
linux-headers-6.14.0-36-generic (6.14.0-36.36~24.04.1) を削除しています ...
linux-image-6.14.0-36-generic (6.14.0-36.36~24.04.1) を削除しています ...
/etc/kernel/prerm.d/dkms:
dkms: removing module nvidia/575.57.08 for kernel 6.14.0-36-generic (x86_64)
Module nvidia/575.57.08 for kernel 6.14.0-36-generic (x86_64):
Before uninstall, this module version was ACTIVE on this kernel.
Deleting /lib/modules/6.14.0-36-generic/updates/dkms/nvidia.ko.zst
Deleting /lib/modules/6.14.0-36-generic/updates/dkms/nvidia-modeset.ko.zst
Deleting /lib/modules/6.14.0-36-generic/updates/dkms/nvidia-drm.ko.zst
Deleting /lib/modules/6.14.0-36-generic/updates/dkms/nvidia-uvm.ko.zst
Deleting /lib/modules/6.14.0-36-generic/updates/dkms/nvidia-peermem.ko.zst
Running depmod... done.
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.14.0-36-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.17.0-14-generic
Found linux image: /boot/vmlinuz-6.14.0-37-generic
Found initrd image: /boot/initrd.img-6.14.0-37-generic
Found memtest86+x64 image: /memtest86+x64.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
linux-modules-extra-6.14.0-36-generic (6.14.0-36.36~24.04.1) を削除しています ...
linux-modules-6.14.0-36-generic (6.14.0-36.36~24.04.1) を削除しています ...
linux-tools-6.14.0-36-generic (6.14.0-36.36~24.04.1) を削除しています ...
(データベースを読み込んでいます ... 現在 253592 個のファイルとディレクトリがインストールされています。)
.../00-google-chrome-stable_145.0.7632.45-1_amd64.deb を展開する準備をしています ...
google-chrome-stable (145.0.7632.45-1) で (144.0.7559.109-1 に) 上書き展開しています ...
.../01-language-pack-gnome-ja_1%3a24.04+20260127_all.deb を展開する準備をしています ...
language-pack-gnome-ja (1:24.04+20260127) で (1:24.04+20250724 に) 上書き展開しています ...
.../02-language-pack-gnome-ja-base_1%3a24.04+20260127_all.deb を展開する準備をしています ...
language-pack-gnome-ja-base (1:24.04+20260127) で (1:24.04+20250724 に) 上書き展開しています ...
.../03-language-pack-ja_1%3a24.04+20260127_all.deb を展開する準備をしています ...
language-pack-ja (1:24.04+20260127) で (1:24.04+20250724 に) 上書き展開しています ...
.../04-language-pack-ja-base_1%3a24.04+20260127_all.deb を展開する準備をしています ...
language-pack-ja-base (1:24.04+20260127) で (1:24.04+20250724 に) 上書き展開しています ...
.../05-python-apt-common_2.7.7ubuntu5.2_all.deb を展開する準備をしています ...
python-apt-common (2.7.7ubuntu5.2) で (2.7.7ubuntu5.1 に) 上書き展開しています ...
.../06-python3-apt_2.7.7ubuntu5.2_amd64.deb を展開する準備をしています ...
python3-apt (2.7.7ubuntu5.2) で (2.7.7ubuntu5.1 に) 上書き展開しています ...
.../07-alsa-ucm-conf_1.2.10-1ubuntu5.9_all.deb を展開する準備をしています ...
alsa-ucm-conf (1.2.10-1ubuntu5.9) で (1.2.10-1ubuntu5.8 に) 上書き展開しています ...
.../08-code_1.109.1-1770669914_amd64.deb を展開する準備をしています ...
code (1.109.1-1770669914) で (1.108.2-1769004815 に) 上書き展開しています ...
.../09-ldap-utils_2.6.10+dfsg-0ubuntu0.24.04.1_amd64.deb を展開する準備をしています ...
ldap-utils (2.6.10+dfsg-0ubuntu0.24.04.1) で (2.6.7+dfsg-1~exp1ubuntu8.2 に) 上書き展開しています ...
.../10-libldap2_2.6.10+dfsg-0ubuntu0.24.04.1_amd64.deb を展開する準備をしています ...
libldap2:amd64 (2.6.10+dfsg-0ubuntu0.24.04.1) で (2.6.7+dfsg-1~exp1ubuntu8.2 に) 上書き展開しています ...
.../11-libboost-iostreams1.83.0_1.83.0-2.1ubuntu3.2_amd64.deb を展開する準備をしています ...
libboost-iostreams1.83.0:amd64 (1.83.0-2.1ubuntu3.2) で (1.83.0-2.1ubuntu3.1 に) 上書き展開しています ...
.../12-libboost-thread1.83.0_1.83.0-2.1ubuntu3.2_amd64.deb を展開する準備をしています ...
libboost-thread1.83.0:amd64 (1.83.0-2.1ubuntu3.2) で (1.83.0-2.1ubuntu3.1 に) 上書き展開しています ...
.../13-libboost-locale1.83.0_1.83.0-2.1ubuntu3.2_amd64.deb を展開する準備をしています ...
libboost-locale1.83.0:amd64 (1.83.0-2.1ubuntu3.2) で (1.83.0-2.1ubuntu3.1 に) 上書き展開しています ...
.../14-libldap-common_2.6.10+dfsg-0ubuntu0.24.04.1_all.deb を展開する準備をしています ...
libldap-common (2.6.10+dfsg-0ubuntu0.24.04.1) で (2.6.7+dfsg-1~exp1ubuntu8.2 に) 上書き展開しています ...
.../15-libnvidia-egl-gbm1_1.1.3-1ubuntu1_amd64.deb を展開する準備をしています ...
De-configuring libnvidia-egl-gbm1:i386 (1.1.2.1-1ubuntu1), to allow configuration of libnvidia-egl-gbm1:amd64 (1.1.3-1ubuntu1) ...
libnvidia-egl-gbm1:amd64 (1.1.3-1ubuntu1) で (1.1.2.1-1ubuntu1 に) 上書き展開しています ...
.../16-libnvidia-egl-gbm1_1.1.3-1ubuntu1_i386.deb を展開する準備をしています ...
libnvidia-egl-gbm1:i386 (1.1.3-1ubuntu1) で (1.1.2.1-1ubuntu1 に) 上書き展開しています ...
.../17-linux-libc-dev_6.8.0-100.100_amd64.deb を展開する準備をしています ...
linux-libc-dev:amd64 (6.8.0-100.100) で (6.8.0-94.96 に) 上書き展開しています ...
.../18-linux-tools-common_6.8.0-100.100_all.deb を展開する準備をしています ...
linux-tools-common (6.8.0-100.100) で (6.8.0-94.96 に) 上書き展開しています ...
code (1.109.1-1770669914) を設定しています ...
google-chrome-stable (145.0.7632.45-1) を設定しています ...
linux-image-6.17.0-14-generic (6.17.0-14.14~24.04.1) を設定しています ...
I: /boot/initrd.img is now a symlink to initrd.img-6.17.0-14-generic
alsa-ucm-conf (1.2.10-1ubuntu5.9) を設定しています ...
linux-libc-dev:amd64 (6.8.0-100.100) を設定しています ...
libboost-thread1.83.0:amd64 (1.83.0-2.1ubuntu3.2) を設定しています ...
libldap-common (2.6.10+dfsg-0ubuntu0.24.04.1) を設定しています ...
linux-headers-6.17.0-14-generic (6.17.0-14.14~24.04.1) を設定しています ...
/etc/kernel/header_postinst.d/dkms:
Sign command: /usr/bin/kmodsign
Binary update-secureboot-policy not found, modules won't be signed
Autoinstall of module nvidia/575.57.08 for kernel 6.17.0-14-generic (x86_64)
Building module(s)........(bad exit status: 2)
Failed command:
'make' -j16 KERNEL_UNAME=6.17.0-14-generic IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/6.17.0-14-generic/build LD=/usr/bin/ld.bfd CONFIG_X86_KERNEL_IBT= modules
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-dkms-575-open.0.crash'
Error! Bad return status for module build on kernel: 6.17.0-14-generic (x86_64)
Consult /var/lib/dkms/nvidia/575.57.08/build/make.log for more information.
Autoinstall on 6.17.0-14-generic failed for module(s) nvidia(10).
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 1
dpkg: パッケージ linux-headers-6.17.0-14-generic の処理中にエラーが発生しました (--configure):
installed linux-headers-6.17.0-14-generic package post-installation script subprocess returned error exit status 1
libboost-iostreams1.83.0:amd64 (1.83.0-2.1ubuntu3.2) を設定しています ...
python-apt-common (2.7.7ubuntu5.2) を設定しています ...
dpkg: 依存関係の問題により linux-headers-generic-hwe-24.04 の設定ができません:
linux-headers-generic-hwe-24.04 は以下に依存 (depends) します: linux-headers-6.17.0-14-generic ...しかし:
パッケージ linux-headers-6.17.0-14-generic はまだ設定されていません。
dpkg: パッケージ linux-headers-generic-hwe-24.04 の処理中にエラーが発生しました (--configure):
依存関係の問題 - 設定を見送ります
linux-tools-common (6.8.0-100.100) を設定しています ...
エラーメッセージは前の失敗から続くエラーであることを示しているので、レポートは書き込まれません。
libldap2:amd64 (2.6.10+dfsg-0ubuntu0.24.04.1) を設定しています ...
libnvidia-egl-gbm1:amd64 (1.1.3-1ubuntu1) を設定しています ...
libnvidia-egl-gbm1:i386 (1.1.3-1ubuntu1) を設定しています ...
python3-apt (2.7.7ubuntu5.2) を設定しています ...
libboost-locale1.83.0:amd64 (1.83.0-2.1ubuntu3.2) を設定しています ...
ldap-utils (2.6.10+dfsg-0ubuntu0.24.04.1) を設定しています ...
dpkg: 依存関係の問題により linux-generic-hwe-24.04 の設定ができません:
linux-generic-hwe-24.04 は以下に依存 (depends) します: linux-headers-generic-hwe-24.04 (= 6.17.0-14.14~24.04.1) ...しかし:
パッケージ linux-headers-generic-hwe-24.04 はまだ設定されていません。
dpkg: パッケージ linux-generic-hwe-24.04 の処理中にエラーが発生しました (--configure):
依存関係の問題 - 設定を見送ります
エラーメッセージは前の失敗から続くエラーであることを示しているので、レポートは書き込まれません。
language-pack-ja (1:24.04+20260127) を設定しています ...
language-pack-ja-base (1:24.04+20260127) を設定しています ...
Generating locales (this might take a while)...
Generation complete.
language-pack-gnome-ja (1:24.04+20260127) を設定しています ...
language-pack-gnome-ja-base (1:24.04+20260127) を設定しています ...
desktop-file-utils (0.27-2build1) のトリガを処理しています ...
gnome-menus (3.36.0-1.1ubuntu3) のトリガを処理しています ...
libc-bin (2.39-0ubuntu8.7) のトリガを処理しています ...
man-db (2.12.0-4build2) のトリガを処理しています ...
shared-mime-info (2.4-4) のトリガを処理しています ...
linux-image-6.17.0-14-generic (6.17.0-14.14~24.04.1) のトリガを処理しています ...
/etc/kernel/postinst.d/dkms:
Sign command: /usr/bin/kmodsign
Binary update-secureboot-policy not found, modules won't be signed
Autoinstall of module nvidia/575.57.08 for kernel 6.17.0-14-generic (x86_64)
Building module(s)........(bad exit status: 2)
Failed command:
'make' -j16 KERNEL_UNAME=6.17.0-14-generic IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/6.17.0-14-generic/build LD=/usr/bin/ld.bfd CONFIG_X86_KERNEL_IBT= modules
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-dkms-575-open.0.crash'
Error! Bad return status for module build on kernel: 6.17.0-14-generic (x86_64)
Consult /var/lib/dkms/nvidia/575.57.08/build/make.log for more information.
Autoinstall on 6.17.0-14-generic failed for module(s) nvidia(10).
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
dpkg: パッケージ linux-image-6.17.0-14-generic の処理中にエラーが発生しました (--configure):
installed linux-image-6.17.0-14-generic package post-installation script subprocess returned error exit status 1
MaxReports にすでに達しているため、レポートは書き込まれません
処理中にエラーが発生しました:
linux-headers-6.17.0-14-generic
linux-headers-generic-hwe-24.04
linux-generic-hwe-24.04
linux-image-6.17.0-14-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
DKMS から nVidia ドライバの登録を抹消する
$ sudo dkms remove nvidia/575.57.08 --all
壊れたパッケージの構成を完了させる
$ sudo dpkg --configure -a
問題の nVidia パッケージを完全に削除する
$ sudo apt purge "nvidia-*"
nVidiaドライバの再インストール
$ sudo ubuntu-drivers autoinstall
参考になる人がいるのかわかりませんが、参考まで。