LsdogodsL / redstone

how to run
1 stars 0 forks source link

dpkg doesnt work #3

Open LsdogodsL opened 1 year ago

LsdogodsL commented 1 year ago

$ 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.

LsdogodsL commented 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:

hachikou136 commented 1 year ago

history | grep find

hachikou136 commented 1 year ago

find --help

LsdogodsL commented 1 year ago

$ history | grep find linux-image-5.19.0-40-generic grep: linux-image-5.19.0-40-generic: No such file or directory

hachikou136 commented 1 year ago

loadkeys jp106

hachikou136 commented 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:

  • 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
LsdogodsL commented 1 year ago

$ 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;

LsdogodsL commented 1 year ago

$ 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.

hachikou136 commented 1 year ago

Please install the linux-headers package or use the --kernelsourcedir option to tell DKMS where it's located.

hachikou136 commented 1 year ago

どうして

なにが

どうやって

hachikou136 commented 1 year ago

もくひょう1

どうして

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コマンドを走らせてみた

hachikou136 commented 1 year ago

もくひょう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

なにが

どうやって

hachikou136 commented 1 year ago

げんざい

もくひょう2の「どうやって」をググりつつ探っているけど、原因である「なにが」なども場合によっては深堀が必要かも

hachikou136 commented 1 year ago

もくひょう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. "install the linux-headers-5.19.0-40-generic package "
  2. "use the --kernelsourcedir option to tell DKMS where it's located."

うち、1番目は(もくひょう1のせいで)aptコマンドが使えないのでインストールできないため実現不可能とおく

なので、2番目の「おねがいごと」をかなえようとググったりしている

hachikou136 commented 1 year ago

検索ワード : dpkg was interrupted on apt

検索結果にヒットしたQA : E: dpkg was interrupted... run 'sudo dpkg --configure -a' - Ask Ubuntu