Debian: 一貫性の悪い状態のパッケージを削除または再インストールしてください

Debian: 一貫性の悪い状態のパッケージを削除または再インストールしてください

パッケージ管理に問題があります。

ある時点でbluezパッケージが破損しているため、アップデートなどを中断したようです。アンインストールおよび/または再インストールしようとしましたが、エラーのみが発生しました。このパッケージが破損している限り、aptでは何もできません。

パッケージの出力を削除してみました。

$ sudo aptitude remove bluez 
The following packages will be REMOVED:  
  bluez 
The following partially installed packages will be configured:
  dictionaries-common dmsetup grub-pc ifupdown install-info rsyslog 
0 packages upgraded, 0 newly installed, 1 to remove and 235 not upgraded.
Need to get 0 B of archives. After unpacking 1,737 kB will be freed.
dpkg: error processing bluez (--remove): 
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
configured to not write apport reports
                                      Errors were encountered while processing:
 bluez
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up install-info (4.13a.dfsg.1-8) ...
/var/lib/dpkg/info/install-info.postinst: 32: /var/lib/dpkg/info/install-info.postinst: update-info-dir: not found
dpkg: error processing install-info (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up ifupdown (0.7~alpha5+really0.6.15) ...
/var/lib/dpkg/info/ifupdown.postinst: 122: /var/lib/dpkg/info/ifupdown.postinst: update-rc.d: not found
dpkg: error processing ifupdown (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up locales (2.13-18) ...
/var/lib/dpkg/info/locales.postinst: 64: /var/lib/dpkg/info/locales.postinst: locale-gen: not found
dpkg: error processing locales (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up dictionaries-common (1.11.6) ...
/var/lib/dpkg/info/dictionaries-common.postinst: 45: /var/lib/dpkg/info/dictionaries-common.postinst: update-dictcommon-aspell: not found
dpkg: error processing dictionaries-common (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up grub-pc (1.99-12) ...
/var/lib/dpkg/info/grub-pc.postinst: line 438: grub-mkdevicemap: command not found
/var/lib/dpkg/info/grub-pc.postinst: line 263: grub-probe: command not found
/var/lib/dpkg/info/grub-pc.postinst: line 263: grub-probe: command not found
/var/lib/dpkg/info/grub-pc.postinst: line 263: grub-probe: command not found
/var/lib/dpkg/info/grub-pc.postinst: line 559: grub-install: command not found
/var/lib/dpkg/info/grub-pc.postinst: line 669: update-grub: command not found
dpkg: error processing grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up dmsetup (2:1.02.65-1) ...
/var/lib/dpkg/info/dmsetup.postinst: 8: /var/lib/dpkg/info/dmsetup.postinst: update-initramfs: not found
dpkg: error processing dmsetup (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up rsyslog (5.8.5-1) ...
/var/lib/dpkg/info/rsyslog.postinst: 45: /var/lib/dpkg/info/rsyslog.postinst: update-rc.d: not found
dpkg: error processing rsyslog (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 install-info
 ifupdown
 locales
 dictionaries-common
 grub-pc
 dmsetup
 rsyslog

Debian テストを実行しています。これは実際にこの特定のパッケージの問題ですか、それともdpkgの問題ですか?パッケージマネージャを変更するにはどうすればよいですか?

ベストアンサー1

これまでこのメッセージを見たことがないため、bluezに固有のものと推測されます。メッセージに従って再インストールしてみましたか?

apt-get install --reinstall bluez

dpkgを使用して、aptキャッシュからbluezパッケージをインストール/構成してみることもできます。 /var/cache/aptでbluezパッケージを見つけます。次のようにインストールします(root)。

dpkg -i <bluez debian package>

おすすめ記事