誤って削除されたカーネルファイル

誤って削除されたカーネルファイル

私のブートパーティションがいっぱいで、ブートパーティションのカーネルファイルのいくつかを手動で削除しました。しかし、私は愚かで、必要なファイルも削除しました。

今すぐ実行しようとすると、sudo apt-get upgrade次の結果が表示されます。

appliance@zabbix:/boot$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-4.4.0-137-generic (4.4.0-137.163) ...
Internal Error: Could not find image (/boot/vmlinuz-4.4.0-137-generic)
dpkg: error processing package linux-image-4.4.0-137-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-137-generic:
 linux-image-extra-4.4.0-137-generic depends on linux-image-4.4.0-137-generic; however:
  Package linux-image-4.4.0-137-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-137-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-4.4.0-137-generic
 linux-image-extra-4.4.0-137-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
appliance@zabbix:/boot$

この問題を解決する方法を知っている人はいますか?

私が試したこと:sudo apt-get install -f出力:

appliance@zabbix:/boot$ sudo apt install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-4.4.0-137-generic (4.4.0-137.163) ...
Internal Error: Could not find image (/boot/vmlinuz-4.4.0-137-generic)
dpkg: error processing package linux-image-4.4.0-137-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-137-generic:
 linux-image-extra-4.4.0-137-generic depends on linux-image-4.4.0-137-generic; however:
  Package linux-image-4.4.0-137-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-137-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-4.4.0-137-generic
 linux-image-extra-4.4.0-137-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

PS出力uname -r

4.4.0-130-generic

ベストアンサー1

今修正しました。

最初の実行:

sudo dpkg -P --force-depends linux-image-4.4.0-137-generic

それから:

sudo apt upgrade -f

今、すべてが正常に戻ってきました!

ありがとうございます! !

おすすめ記事