debパッケージをアップグレードするときにdpkgエラーコード(1)をデバッグする方法は?

debパッケージをアップグレードするときにdpkgエラーコード(1)をデバッグする方法は?
Operating System: Debian GNU/Linux 8.8 (jessie)
Kernel: Linux 3.16.0-4-amd64
Architecture: x86-64

複数の Debian サーバーがあります。

それぞれは、デフォルトのストレージnginxバージョン1.6に含まれています。

ソースnginxストアから更新した後、すべてのサーバーで同じエラーが発生します。

Preparing to unpack .../nginx_1.12.0-1~jessie_amd64.deb ...
Unpacking nginx (1.12.0-1~jessie) over (1.6.2-5+deb8u4) ...
dpkg: error processing archive /var/cache/apt/archives/nginx_1.12.0-1~jessie_amd64.deb (--unpack):
  trying to overwrite '/etc/default/nginx', which is also in package nginx-common 1.6.2-5+deb8u4
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
  /var/cache/apt/archives/nginx_1.12.0-1~jessie_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

ソースからパッケージをビルドしようとしましたが、debまだ同じエラーが発生しました。

Debian を最新バージョンに再インストールしなくても Debian をアップグレードする方法はありません。

/var/log/dpkg.log:

2017-06-26 19:56:31 startup archives install
2017-06-26 19:56:31 upgrade nginx:all 1.6.2-5+deb8u4 1.12.0-1~jessie
2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4
2017-06-26 19:56:31 status unpacked nginx:all 1.6.2-5+deb8u4
2017-06-26 19:56:31 status half-installed nginx:all 1.6.2-5+deb8u4
2017-06-26 19:56:32 status unpacked nginx:all 1.6.2-5+deb8u4
2017-06-26 19:56:32 status installed nginx:all 1.6.2-5+deb8u4

デフォルトを完全に削除/削除し、nginx最新バージョンをインストールしようとしましたが、まだエラーが発生します。

The following packages have been kept back:
libpcre3 libpcre3-dev nginx nginx-common nginx-full
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

ベストアンサー1

ルートになった:

sudo -i

または:

su

2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4

構成パッケージ:

dpkg --configure -a

破損したパッケージを修復します。

apt-get install --fix-broken

アップグレードを続けます。

apt-get dist-upgrade

おすすめ記事