package-managersbroken-pipe

apt --fix-broken install does not work, package manager broken after installing wine-stable


after uninstalling old version of wine-1.8 and installing it again, I encountered an ERROR in package manager for Broken packages:

Preparing to unpack .../libwine_3.0-1ubuntu1_amd64.deb ...
Unpacking libwine:amd64 (3.0-1ubuntu1) ...

dpkg: error processing archive /var/cache/apt/archives/libwine_3.0-1ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/wine/acledit.dll.so', which is also in package wine1.8-amd64 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../libwine_3.0-1ubuntu1_i386.deb ...
Unpacking libwine:i386 (3.0-1ubuntu1) ...

dpkg: error processing archive /var/cache/apt/archives/libwine_3.0-1ubuntu1_i386.deb (--unpack):
 trying to overwrite '/usr/lib/i386-linux-gnu/wine/acledit.dll.so', which is also in package wine1.8-i386:i386 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

Errors were encountered while processing:
 /var/cache/apt/archives/libwine_3.0-1ubuntu1_amd64.deb
 /var/cache/apt/archives/libwine_3.0-1ubuntu1_i386.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

Solution

  • I SOLVED this problem with the following solution:

    sudo dpkg --force depends -P wine1.8-i386
    sudo dpkg --force depends -P wine1.8
    sudo dpkg --force depends -P wine1.8-amd64
    

    and finally you need to run this command to fix all broken packages:

    sudo apt --fix-broken install
    

    (for more reference check this out.)