error message when reinstalling

Asked by moliphant4

E: wine: subprocess installed pre-removal script returned error exit status 2

I am new to Linux and the program wine was not working correctly. i did some reading that suggested I uninstall and reinstall with a newer version. This is the error message i get when use the synaptic package manager to attempt to reinstall. it downloads the package and gives me this error then another one saying that not all of the changes and updates succeeded. I would appreciate any help This is day 2 with Linux and the learning curve is very steep.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu synaptic Edit question
Assignee:
No assignee Edit question
Solved by:
moliphant4
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

You can upgrade versions of Ubuntu to the next release.

Can you give the output of:

sudo fuser -vki /var/lib/dpkg/lock;sudo dpkg --configure -a; sudo apt-get update; sudo apt-get upgrade

Thanks

Revision history for this message
moliphant4 (molipha4) said :
#2

michael@ubuntu:~$ sudo fuser -vki /var/lib/dpkg/lock
[sudo] password for michael:
michael@ubuntu:~$ sudo dpkg --configure -a
michael@ubuntu:~$ sudo fuser -vki /var/lib/dpkg/lock
michael@ubuntu:~$ sudo apt-get update
Hit http://security.ubuntu.com karmic-security Release.gpg
Ign http://security.ubuntu.com karmic-security/main Translation-en_US
Hit http://us.archive.ubuntu.com karmic Release.gpg
Ign http://us.archive.ubuntu.com karmic/main Translation-en_US
Hit http://archive.canonical.com karmic Release.gpg
Ign http://archive.canonical.com karmic/partner Translation-en_US
Ign http://security.ubuntu.com karmic-security/restricted Translation-en_US
Ign http://security.ubuntu.com karmic-security/universe Translation-en_US
Ign http://security.ubuntu.com karmic-security/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com karmic/restricted Translation-en_US
Ign http://us.archive.ubuntu.com karmic/universe Translation-en_US
Ign http://us.archive.ubuntu.com karmic/multiverse Translation-en_US
Hit http://us.archive.ubuntu.com karmic-updates Release.gpg
Ign http://us.archive.ubuntu.com karmic-updates/main Translation-en_US
Ign http://us.archive.ubuntu.com karmic-updates/restricted Translation-en_US
Ign http://us.archive.ubuntu.com karmic-updates/universe Translation-en_US
Ign http://us.archive.ubuntu.com karmic-updates/multiverse Translation-en_US
Hit http://security.ubuntu.com karmic-security Release
Hit http://archive.canonical.com karmic Release
Hit http://us.archive.ubuntu.com karmic Release
Hit http://us.archive.ubuntu.com karmic-updates Release
Hit http://security.ubuntu.com karmic-security/main Packages
Hit http://archive.canonical.com karmic/partner Packages
Hit http://us.archive.ubuntu.com karmic/main Packages
Hit http://us.archive.ubuntu.com karmic/restricted Packages
Hit http://us.archive.ubuntu.com karmic/main Sources
Hit http://us.archive.ubuntu.com karmic/restricted Sources
Hit http://us.archive.ubuntu.com karmic/universe Packages
Hit http://security.ubuntu.com karmic-security/restricted Packages
Hit http://security.ubuntu.com karmic-security/main Sources
Hit http://security.ubuntu.com karmic-security/restricted Sources
Hit http://security.ubuntu.com karmic-security/universe Packages
Hit http://archive.canonical.com karmic/partner Sources
Hit http://us.archive.ubuntu.com karmic/universe Sources
Hit http://us.archive.ubuntu.com karmic/multiverse Packages
Hit http://us.archive.ubuntu.com karmic/multiverse Sources
Hit http://us.archive.ubuntu.com karmic-updates/main Packages
Hit http://us.archive.ubuntu.com karmic-updates/restricted Packages
Hit http://us.archive.ubuntu.com karmic-updates/main Sources
Hit http://us.archive.ubuntu.com karmic-updates/restricted Sources
Hit http://us.archive.ubuntu.com karmic-updates/universe Packages
Hit http://security.ubuntu.com karmic-security/universe Sources
Hit http://security.ubuntu.com karmic-security/multiverse Packages
Hit http://security.ubuntu.com karmic-security/multiverse Sources
Hit http://us.archive.ubuntu.com karmic-updates/universe Sources
Hit http://us.archive.ubuntu.com karmic-updates/multiverse Packages
Hit http://us.archive.ubuntu.com karmic-updates/multiverse Sources
Reading package lists... Done
michael@ubuntu:~$ sudo apt-get upgrade
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, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up wine (1.0.1-0ubuntu8) ...
dpkg (subprocess): unable to execute installed post-installation script: Exec format error
dpkg: error processing wine (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of playonlinux:
 playonlinux depends on wine; however:
  Package wine is not configured yet.
dpkg: error processing playonlinux (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 wine
 playonlinux
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

ok then run:

sudo apt-get install wine; sudo apt-get -f install

Give the output of the command

Thanks

Revision history for this message
moliphant4 (molipha4) said :
#4

michael@ubuntu:~$ sudo apt-get install wine; sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
wine is already the newest version.
wine set to manually installed.
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.31-14 linux-headers-2.6.31-14-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up wine (1.0.1-0ubuntu8) ...
dpkg (subprocess): unable to execute installed post-installation script: Exec format error
dpkg: error processing wine (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of playonlinux:
 playonlinux depends on wine; however:
  Package wine is not configured yet.
dpkg: error processing playonlinux (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 wine
 playonlinux
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.31-14 linux-headers-2.6.31-14-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up wine (1.0.1-0ubuntu8) ...
dpkg (subprocess): unable to execute installed post-installation script: Exec format error
dpkg: error processing wine (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of playonlinux:
 playonlinux depends on wine; however:
  Package wine is not configured yet.
dpkg: error processing playonlinux (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 wine
 playonlinux
E: Sub-process /usr/bin/dpkg returned an error code (1)
I cannot thank you enough for trying to help me with this. I feel very ignorant with linux and am trying very hard to educate myself.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

sudo apt-get --purge remove playonlinux wine; sudo apt-get --purge autoremove; sudo apt-get clean

Post the output of that

Revision history for this message
moliphant4 (molipha4) said :
#6

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  wine-gecko python-wxgtk2.8 lib32nss-mdns winbind python-wxversion
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  playonlinux* wine*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 57.8MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 161943 files and directories currently installed.)
Removing playonlinux ...
dpkg (subprocess): unable to execute installed pre-removal script: Exec format error
dpkg: error processing playonlinux (--purge):
 subprocess installed pre-removal script returned error exit status 2
dpkg (subprocess): unable to execute installed post-installation script: Exec format error
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 2
Removing wine ...
dpkg (subprocess): unable to execute installed pre-removal script: Exec format error
dpkg: error processing wine (--purge):
 subprocess installed pre-removal script returned error exit status 2
Errors were encountered while processing:
 playonlinux
 wine
E: Sub-process /usr/bin/dpkg returned an error code (1)
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, 0B of additional disk space will be used.
Setting up wine (1.0.1-0ubuntu8) ...
dpkg (subprocess): unable to execute installed post-installation script: Exec format error
dpkg: error processing wine (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of playonlinux:
 playonlinux depends on wine; however:
  Package wine is not configured yet.
dpkg: error processing playonlinux (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 wine
 playonlinux
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
moliphant4 (molipha4) said :
#7

Also i do not no if this will help but i have experienced error codes when trying to install new programs since this happened .
This is an example of the error I receive.

installArchives() failed: Selecting previously deselected package almanah.

(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 161944 files and directories currently installed.)

Unpacking almanah (from .../almanah_0.6.1-1_amd64.deb) ...

Processing triggers for hicolor-icon-theme ...

Processing triggers for desktop-file-utils ...

Processing triggers for man-db ...

Setting up wine (1.0.1-0ubuntu8) ...

dpkg (subprocess): unable to execute installed post-installation script: Exec format error

dpkg: error processing wine (--configure):

 subprocess installed post-installation script returned error exit status 2

dpkg: dependency problems prevent configuration of playonlinux:

 playonlinux depends on wine; however:

  Package wine is not configured yet.

dpkg: error processing playonlinux (--configure):

 dependency problems - leaving unconfigured

Setting up almanah (0.6.1-1) ...

No apport report written because the error message indicates its a followup error from a previous failure.

Revision history for this message
Stefan Eggers (stefan-eggers) said :
#8

Did some research and found someone having a similar problem and fiddling with some files in /var/lib/dpkg. Checked on my test system how it should look and I think some additional info will shed more light on the problem.

What is the result of this command:

ls -l /var/lib/dpkg/info/wine.*

If there is a file named /var/lib/dpkg/info/wine.preinst, .../wine.prerm, .../wine.postinst and .../wine.postrm, does it look like a shell script (first line "#! /bin/...")? If it is not too long, what do these files contain?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

Tey contain how to install and uninstall the app, the files get copied and installed but also there will be post-installation steps.

Looks like playonlinux is screwing stuff up.

Revision history for this message
moliphant4 (molipha4) said :
#10

I reinstalled Ubuntu to start over because I had screwed something up and linux would not boot. That did solve this problem though. Thank you very much for your help and i have learned not to dabble in what i do not understand yet.