Open LsdogodsL opened 1 year ago
$ sudo dpkg --configure -a Setting up linux-image-5.19.0-40-generic (5.19.0-40.41~22.04.1) ... Processing triggers for linux-image-5.19.0-40-generic (5.19.0-40.41~22.04.1) ... /etc/kernel/postinst.d/dkms:
history | grep find
find --help
$ history | grep find linux-image-5.19.0-40-generic grep: linux-image-5.19.0-40-generic: No such file or directory
loadkeys jp106
$ sudo dpkg --configure -a Setting up linux-image-5.19.0-40-generic (5.19.0-40.41~22.04.1) ... Processing triggers for linux-image-5.19.0-40-generic (5.19.0-40.41~22.04.1) ... /etc/kernel/postinst.d/dkms:
- dkms: running auto installation service for kernel 5.19.0-40-generic Error! Your kernel headers for kernel 5.19.0-40-generic cannot be found. Please install the linux-headers-5.19.0-40-generic package or use the --kernelsourcedir option to tell DKMS where it's located. ...done. /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-5.19.0-40-generic
$ sudo dpkg --configure --kernelsourcedir /home/lsdogodsl/Downloads/linux-headers-5.19.0-40-generic_5.19.0-40.41~22.04.1_amd64.deb -a dpkg: error: unknown option --kernelsourcedir
Type dpkg --help for help about installing and deinstalling packages []; Use 'apt' or 'aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg --force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating .deb files;
$ dkms Usage: /usr/sbin/dkms [action] [options] [action] = { add | remove | build | install | uninstall | match | autoinstall | mkdriverdisk | mktarball | ldtarball | mkrpm | mkkmp | mkdeb | mkdsc | mkbmdeb | status } [options] = [-m module] [-v module-version] [-k kernel-version] [-a arch] [-d distro] [-c dkms.conf-location] [-q] [--force] [--force-version-override] [--all] [--templatekernel=kernel] [--directive='cli-directive=cli-value'] [--config=kernel-.config-location] [--archive=tarball-location] [--kernelsourcedir=source-location] [--no-prepare-kernel] [--no-initrd] [--binaries-only] [--source-only] [-r release (SuSE)] [--verbose] [--size] [--spec=specfile] [--media=floppy|iso|tar] [--legacy-postinst=0|1] [--no-depmod] [-j number] [--version] Error! No action was specified.
Please install the linux-headers package or use the --kernelsourcedir option to tell DKMS where it's located.
aptコマンドの実行中にエラーが発生した、解決したい
$ sudo apt-get install linux-headers-5.19.0-40-generic
[sudo] password for user
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
エラーメッセージにある通り、sudo dpkg --configure -a
コマンドを走らせてみた
もくひょう1の解決中にエラーメッセージに示されたコマンドによってエラーが出たので解決したい
具体的には、dpkg
コマンドの実行中にエラーが発生した
$ sudo dpkg --configure -a
Setting up linux-image-5.19.0-40-generic (5.19.0-40.4122.04.1) ...
Processing triggers for linux-image-5.19.0-40-generic (5.19.0-40.4122.04.1) ...
/etc/kernel/postinst.d/dkms:
dkms: running auto installation service for kernel 5.19.0-40-generic
Error! Your kernel headers for kernel 5.19.0-40-generic cannot be found.
Please install the linux-headers-5.19.0-40-generic package or use the --kernelsourcedir option to tell DKMS where it's located.
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.19.0-40-generic
もくひょう2の「どうやって」をググりつつ探っているけど、原因である「なにが」なども場合によっては深堀が必要かも
もくひょう1の解決中にエラーメッセージに示されたコマンドによってエラーが出たので解決したい
具体的には、dpkg
コマンドの実行中にエラーが発生した
$ sudo dpkg --configure -a
Setting up linux-image-5.19.0-40-generic (5.19.0-40.4122.04.1) ...
Processing triggers for linux-image-5.19.0-40-generic (5.19.0-40.4122.04.1) ...
/etc/kernel/postinst.d/dkms:
dkms: running auto installation service for kernel 5.19.0-40-generic
Error! Your kernel headers for kernel 5.19.0-40-generic cannot be found.
Please install the linux-headers-5.19.0-40-generic package or use the --kernelsourcedir option to tell DKMS where it's located.
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.19.0-40-generic
エラーメッセージには下記のようにある :
Please install the linux-headers-5.19.0-40-generic package or use the --kernelsourcedir option to tell DKMS where it's located.
これを解釈するとコマンドから二つの「おねがいごと」をされていることになる
うち、1番目は(もくひょう1のせいで)apt
コマンドが使えないのでインストールできないため実現不可能とおく
なので、2番目の「おねがいごと」をかなえようとググったりしている
検索ワード : dpkg was interrupted on apt
検索結果にヒットしたQA : E: dpkg was interrupted... run 'sudo dpkg --configure -a' - Ask Ubuntu
$ sudo apt-get install linux-headers-5.19.0-40-generic [sudo] password for user
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.