[MASTER] Exec format error : package failed to install/remove : installation/removal script returned error exit status 2
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | dpkg (Debian) |
Fix Released
|
Unknown
|
||
| | dpkg (Ubuntu) |
High
|
Unassigned | ||
| | Karmic |
Undecided
|
Unassigned | ||
Bug Description
Under some conditions package installation/
-- Error during installation --
Setting up screenlets (0.1.2-7) ...
dpkg (subprocess): unable to execute installed post-installation script: Exec format error
dpkg: error processing screenlets (--configure):
subprocess installed post-installation script returned error exit status 2
-- Error during removal --
Removing gnome-do ...
dpkg (subprocess): unable to execute installed pre-removal script: Exec format error
dpkg: error processing gnome-do (--purge):
subprocess installed pre-removal script returned error exit status 2
This error occurs when one of the installation or removal scripts (/var/lib/
== HOW TO REPRODUCE ==
Install a package and emulates a system crash before 30 seconds:
# apt-get install hello; sleep 20; echo b > /proc/sysrq-trigger
[simulates a system crash]
After reboot both installation and removal scripts are 0 bytes. You will notice that hello.list was correctly written to disk because of the fsync call in dpkg/src/filesdb.c
$ ls -l /var/lib/
-rw-r--r-- 1 root root 323 2010-02-09 00:42 /var/lib/
-rwxr-xr-x 1 root root 0 2009-08-15 19:17 /var/lib/
-rwxr-xr-x 1 root root 0 2009-08-15 19:17 /var/lib/
If you replay the test but adding a sync before the system crash:
# apt-get install hello; sync; echo b > /proc/sysrq-trigger
After reboot the files are fine:
$ ls -l /var/lib/
-rw-r--r-- 1 root root 323 2010-02-09 00:46 /var/lib/
-rwxr-xr-x 1 root root 103 2009-08-15 19:17 /var/lib/
-rwxr-xr-x 1 root root 74 2009-08-15 19:17 /var/lib/
If I adjust /proc/sys/
== WORKAROUNDS ==
Execute the following commands in a terminal
(GNOME: Applications -> Accessories -> Terminal
KDE: KMenu -> Applications -> System -> Terminal [Konsole] )
Workaround A: Remove the package and reinstall
$ sudo rm /var/lib/
$ sudo apt-get remove --purge PACKAGE
$ sudo apt-get clean
$ sudo apt-get update
Then reinstall the package
Workaround B: Finish the install when the package can't be removed
$ sudo apt-get clean
$ sudo aptitude download PACKAGE
$ sudo dpkg --unpack ./PACKAGE_
$ sudo dpkg --configure PACKAGE
Replace PACKAGE with the package name which fails to install/remove.
== Localization ==
The same error in non-english language:
. fr: Erreur de format pour exec()
. Error de formato ejecutable
. Errore di formato di exec
. en: Exec format error
. hu: Érvénytelen végrehajtható fájlformátum
. Exec formátum hiba
. nl: Verkeerd uitvoerbaar bestand
. Exec 格式错误
. sv: Formatfel på körbar fil
. fi: Käynnistettävän tiedoston muoto virheellinen
. zh_CN: 可执行文件格式错误
. ja: 実行形式エラー
. ru: Ошибка формата выполняемого файла
. es: Formato de ejecutable incorrecto
. ca: L’executable té un format erroni
. it: Formato eseguibile non valido
. de: Fehler im Format der Programmdatei
. pt: Erro de formato de executável
. pt_BR: Erro no formato exec
. da: Ugyldigt format på eksekverbar fil
More localizations can be found at https:/
Related branches
- Michael Nelson (community): Approve (code) on 2010-02-12
-
Diff: 11 lines (+0/-1)1 file modifiedlib/lp/services/mail/sendmail.py (+0/-1)
CVE References
| tags: | added: bugpattern-needed |
| description: | updated |
| description: | updated |
| description: | updated |
| tags: | added: metabug |
| Changed in dpkg (Debian): | |
| status: | Unknown → New |
| description: | updated |
| Jean-Baptiste Lallement (jibel) wrote : | #1 |
| Changed in dpkg (Ubuntu): | |
| assignee: | nobody → Jean-Baptiste Lallement (jibel) |
| assignee: | Jean-Baptiste Lallement (jibel) → nobody |
| importance: | Undecided → High |
| status: | New → Triaged |
| assignee: | nobody → Jean-Baptiste Lallement (jibel) |
| Jean-Baptiste Lallement (jibel) wrote : | #2 |
u-m-s team please wait before reviewing the patch, work is still in progress with upstream to push the fix in Debian. I'll provide another patch once it's done. Thanks.
| Changed in dpkg (Ubuntu): | |
| status: | Triaged → In Progress |
| Colin Watson (cjwatson) wrote : | #3 |
I've unsubscribed ubuntu-
| tags: | added: patch |
| shamnad (hindustani-india) wrote : Re: [Bug 512096] Re: [MASTER] Exec format error : package failed to install/remove : installation/removal script returned error exit status 2 | #4 |
in my openion " so many bugs are 9.10 than 9.04" am i right?
On Mon, Mar 1, 2010 at 5:00 PM, Brian Murray <email address hidden> wrote:
> ** Tags added: patch
>
> --
> [MASTER] Exec format error : package failed to install/remove :
> installation/
> https:/
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “dpkg” package in Ubuntu: In Progress
> Status in “dpkg” package in Debian: New
>
> Bug description:
> Under some conditions package installation/
> following error:
>
> -- Error during installation --
> Setting up screenlets (0.1.2-7) ...
> dpkg (subprocess): unable to execute installed post-installation script:
> Exec format error
> dpkg: error processing screenlets (--configure):
> subprocess installed post-installation script returned error exit status 2
>
> -- Error during removal --
> Removing gnome-do ...
> dpkg (subprocess): unable to execute installed pre-removal script: Exec
> format error
> dpkg: error processing gnome-do (--purge):
> subprocess installed pre-removal script returned error exit status 2
>
> This error occurs when one of the installation or removal scripts
> (/var/lib/
>
> == HOW TO REPRODUCE ==
> Install a package and emulates a system crash before 30 seconds:
> # apt-get install hello; sleep 20; echo b > /proc/sysrq-trigger
> [simulates a system crash]
> After reboot both installation and removal scripts are 0 bytes. You will
> notice that hello.list was correctly written to disk because of the fsync
> call in dpkg/src/filesdb.c
> $ ls -l /var/lib/
> -rw-r--r-- 1 root root 323 2010-02-09 00:42 /var/lib/
> -rwxr-xr-x 1 root root 0 2009-08-15 19:17
> /var/lib/
> -rwxr-xr-x 1 root root 0 2009-08-15 19:17 /var/lib/
>
> If you replay the test but adding a sync before the system crash:
> # apt-get install hello; sync; echo b > /proc/sysrq-trigger
> After reboot the files are fine:
> $ ls -l /var/lib/
> -rw-r--r-- 1 root root 323 2010-02-09 00:46 /var/lib/
> -rwxr-xr-x 1 root root 103 2009-08-15 19:17
> /var/lib/
> -rwxr-xr-x 1 root root 74 2009-08-15 19:17 /var/lib/
>
> If I adjust /proc/sys/
> ( for exemple 1000 in the test above ) then data are correctly written to
> disk.
>
> == WORKAROUNDS ==
> Execute the following commands in a terminal
> (GNOME: Applications -> Accessories -> Terminal
> KDE: KMenu -> Applications -> System -> Terminal [Konsole] )
>
> Workaround A: Remove the package and reinstall
>
> $ sudo rm /var/lib/
> $ sudo apt-get remove --purge PACKAGE
> $ sudo apt-get clean
> $ sudo apt-get update
>
> Then reinstall the package
>
> Workaround B: Finish the install when the package can't be removed
>
> $ sudo apt-get clean
> $ sudo aptitude download PACKAGE
> $ sudo dpkg --unpack ./PACKAGE_
> $ sudo dpkg --configure PACKAGE
>
> Replace PACKAGE...
| tags: |
added: patch-upstreaminput removed: patch |
| Tony B (tonesbox) wrote : | #5 |
Hello Mr Murray,
Thank you very much for your email. I'm not sure I understand much of it but
I ran *sudo rm /var/lib/
"workaround" suggestion A to remove the package, but I got the message that
no such file or directory exists. So then I went to your workaround
alternative B to be used when package can't be removed. I got the following
printout:-*
tony@tony-laptop:~$ sudo rm /var/lib/
[sudo] password for tony:
rm: cannot remove `/var/lib/
directory
tony@tony-laptop:~$ sudo apt-get clean
[sudo] password for tony:
tony@tony-laptop:~$ sudo aptitude download PACKAGE
Reading package lists... Done
Building dependency tree
Reading state information... Done
Initialising package states... Done
Writing extended state information... Done
E: Can't find a package named "PACKAGE"
tony@tony-laptop:~$ sudo dpkg --unpack.
dpkg: unknown option --unpack.
Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --license|--licence for copyright licence and lack of warranty
(GNU GPL) [*].
Options marked [*] produce a lot of output - pipe it through `less' or
`more' !
tony@tony-laptop:~$ sudo dpkg --configure PACKAGE
dpkg: error processing package (--configure):
no package named `package' is installed, cannot configure
Errors were encountered while processing:
package
tony@tony-laptop:~$
I think I've probably done something wrong, haven't I?
Regards,
Tony Boulind
On 5 March 2010 23:43, Brian Murray <email address hidden> wrote:
> ** Tags added: patch-upstreaminput
> ** Tags removed: patch
>
> --
> [MASTER] Exec format error : package failed to install/remove :
> installation/
> https:/
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “dpkg” package in Ubuntu: In Progress
> Status in “dpkg” package in Debian: New
>
> Bug description:
> Under some conditions package installation/
> following error:
>
> -- Error during installation --
> Setting up screenlets (0.1.2-7) ...
> dpkg (subprocess): unable to execute installed post-installation script:
> Exec format error
> dpkg: error processing screenlets (--configure):
> subprocess installed post-installation script returned error exit status 2
>
> -- Error during removal --
> Removing gnome-do ...
> dpkg (subprocess): unable to execute installed pre-removal script: Exec
> format error
> dpkg: error processing gnome-do (--purge):
> subprocess installed pre-removal script returned error exit status 2
>
> This error occurs when one of the installation or removal scripts
> (/var/lib/
>
> == HOW TO REPRODUCE ==
> Install a package and emulates a system crash before 30 seconds:
> # apt-ge...
| Jeff. (jules-17) wrote : RE: [Bug 512096] Re: [MASTER] Exec format error : package failed to install/remove : installation/removal script returned error exit status 2 | #6 |
You must instead of PACKAGE the name of your package which you are problems.
> Date: Sun, 7 Mar 2010 15:22:40 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: Re: [Bug 512096] Re: [MASTER] Exec format error : package failed to install/remove : installation/
>
> Hello Mr Murray,
>
> Thank you very much for your email. I'm not sure I understand much of it but
> I ran *sudo rm /var/lib/
> "workaround" suggestion A to remove the package, but I got the message that
> no such file or directory exists. So then I went to your workaround
> alternative B to be used when package can't be removed. I got the following
> printout:-*
>
>
> tony@tony-laptop:~$ sudo rm /var/lib/
> [sudo] password for tony:
> rm: cannot remove `/var/lib/
> directory
> tony@tony-laptop:~$ sudo apt-get clean
> [sudo] password for tony:
> tony@tony-laptop:~$ sudo aptitude download PACKAGE
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Initialising package states... Done
> Writing extended state information... Done
> E: Can't find a package named "PACKAGE"
> tony@tony-laptop:~$ sudo dpkg --unpack.
> dpkg: unknown option --unpack.
>
> Type dpkg --help for help about installing and deinstalling packages [*];
> Use `dselect' or `aptitude' for user-friendly package management;
> Type dpkg -Dhelp for a list of dpkg debug flag values;
> Type dpkg --force-help for a list of forcing options;
> Type dpkg-deb --help for help about manipulating *.deb files;
> Type dpkg --license|--licence for copyright licence and lack of warranty
> (GNU GPL) [*].
>
> Options marked [*] produce a lot of output - pipe it through `less' or
> `more' !
> tony@tony-laptop:~$ sudo dpkg --configure PACKAGE
> dpkg: error processing package (--configure):
> no package named `package' is installed, cannot configure
> Errors were encountered while processing:
> package
> tony@tony-laptop:~$
>
>
> I think I've probably done something wrong, haven't I?
>
> Regards,
> Tony Boulind
>
> On 5 March 2010 23:43, Brian Murray <email address hidden> wrote:
>
> > ** Tags added: patch-upstreaminput
> > ** Tags removed: patch
> >
> > --
> > [MASTER] Exec format error : package failed to install/remove :
> > installation/
> > https:/
> > You received this bug notification because you are a direct subscriber
> > of a duplicate bug.
> >
> > Status in “dpkg” package in Ubuntu: In Progress
> > Status in “dpkg” package in Debian: New
> >
> > Bug description:
> > Under some conditions package installation/
> > following error:
> >
> > -- Error during installation --
> > Setting up screenlets (0.1.2-7) ...
> > dpkg (subprocess): unable to execute installed post-installation script:
> > Exec format error
> > dpkg: error processing screenlets (--configure):
> > subprocess ins...
| Colin Watson (cjwatson) wrote : | #7 |
A change to use fsync has been committed upstream; I'll deal with backporting it to Lucid.
| Jean-Baptiste Lallement (jibel) wrote : | #8 |
Tests done with the latest git and bzr revisions are positives. The only thing that remains is that the file status-new is not synced to status. This is a minor a annoyance since running 'dpkg --configure -a' after the crash will correct the error.
There is a performance impact of a factor 2 (2 times slower) on installation and upgrade of a package.
It would be great if additional testing could be done.
| Colin Watson (cjwatson) wrote : Re: [Bug 512096] Re: [MASTER] Exec format error : package failed to install/remove : installation/removal script returned error exit status 2 | #9 |
I agree that (subjectively - I haven't timed it) it seems somewhat
slower. Correctness over performance, though, so I'm going to go ahead
with this for Lucid at the moment - we can backport additional
performance fixes as they're done upstream.
| Launchpad Janitor (janitor) wrote : | #10 |
This bug was fixed in the package dpkg - 1.15.5.6ubuntu2
---------------
dpkg (1.15.5.6ubuntu2) lucid; urgency=high
* Backport from upstream:
- Use FIEMAP when available (on Linux based systems) to sort the .list
files loading order. With a cold cache it improves up to a 70%.
Thanks to Morten Hustveit <email address hidden>. LP: #442114
- Call fsync(2) after writing files on disk, to get the atomicity
guarantees when doing rename(2). Based on a patch by Jean-Baptiste
Lallement <email address hidden>.
Closes: #430958, LP: #512096
* Security fixes by Raphaël Hertzog, also backported from upstream
(CVE-
- Modify dpkg-source to error out when it would apply patches containing
insecure paths (with "/../") and also error out when it would apply a
patch through a symlink. Those checks are required as patch will
happily modify files outside of the target directory and unpacking a
source package should not be able to have any side-effect outside of
the target directory. LP: #532445
- Also error out when the quilt series contains a path with "/../" as
this can cause patch to create files outside of the source package due
to the -B .pc/$path option that it gets.
-- Colin Watson <email address hidden> Thu, 11 Mar 2010 00:34:28 +0000
| Changed in dpkg (Ubuntu): | |
| status: | In Progress → Fix Released |
| Changed in dpkg (Debian): | |
| status: | New → Fix Released |
| Changed in dpkg (Ubuntu): | |
| status: | Fix Released → Confirmed |
| Colin Watson (cjwatson) wrote : | #11 |
anoop: When you reopen a bug, you must explain why - otherwise we'll close it again (like this).
| Changed in dpkg (Ubuntu): | |
| status: | Confirmed → Fix Released |
| Philip Muškovac (yofel) wrote : | #12 |
According to the changelog the patch was reverted to fix bug 537241. (fsync making dpkg too slow)
dpkg (1.15.5.6ubuntu3) lucid; urgency=low
* Revert fsync during package unpack for now; it's unacceptably slow for
packages with lots of small files, and we can't ship beta-1 this way.
We'll do something better once it's decided upstream (LP: #537241).
-- Colin Watson <email address hidden> Tue, 16 Mar 2010 10:04:38 +0000
| Changed in dpkg (Ubuntu): | |
| status: | Fix Released → Triaged |
| Colin Watson (cjwatson) wrote : | #13 |
Philip, only one small part of the patch was reverted, and that part shouldn't have been relevant to the error that's the subject of this bug.
| Changed in dpkg (Ubuntu): | |
| status: | Triaged → Fix Released |
| Martin Pitt (pitti) wrote : | #14 |
> I agree that (subjectively - I haven't timed it) it seems somewhat slower.
Just to throw in some numbers for comparison:
$ sudo time dpkg -i /var/cache/
-> 64 s
$ sudo time /home/dchroot/
-> 21 s
given that the 5 triggers alone take some 10 s, this is a times-5 performance penalty (and load goes to 1.8 in the first run, which makes the machine quite sluggish).
But of course correctness > performance.
| Colin Watson (cjwatson) wrote : | #15 |
Ideally there would be some way to interrogate the kernel to discover
whether we need to do this rubbish for a given filesystem.
| Changed in dpkg (Ubuntu): | |
| status: | Fix Released → Fix Committed |
| Changed in dpkg (Ubuntu): | |
| status: | Fix Committed → Fix Released |
| Jean-Baptiste Lallement (jibel) wrote : | #16 |
reopening due to recent cases in lucid.
Only maintainer scripts are affected by this problem, data files are correctly synced.
| Changed in dpkg (Ubuntu): | |
| assignee: | Jean-Baptiste Lallement (jibel) → nobody |
| status: | Fix Released → Triaged |
| description: | updated |
| ndstate (ndstate) wrote : | #17 |
Workaround A worked on:
bzr
bzrtools
python-dateutil
python-gnomedesktop
python-gweather
python-paramiko
python-vobject
Thank you very much!!! :D
| Raghav Sethi (raghavsethi62) wrote : | #18 |
Workaround A works awesomely! :D
Thank you all very much! :D
| ibrahim.k (bero-hacker) wrote : | #19 |
I don't Understand anything :(
| Chris (crido) wrote : Re: [Bug 512096] Re: [MASTER] Exec format error : package failed to install/remove : installation/removal script returned error exit status 2 | #21 |
2010/6/9 ibrahim.k <email address hidden>
> I don't Understand anything :(
>
>
no worries, case is resolved, the reply was just a "thank-you" to your
fantastic support!!!!
Kind regards,
Xian
| Behrooz Amoozad (behrooz0az) wrote : | #22 |
I'm new to Linux and don't understand anything.
last line before hang is:
Preparing to replace mysql-server-5.1 5.1.41-3ubuntu12.1 (using .../mysql-
what should i exactly do?
I cannot install anything.I'm trying any dpkg command for +7 days.
nothing helped me.somebody please help me.
| maria rossi (iperbole10) wrote : | #23 |
SOLVED :
1. Close Synaptic or any package manager. Wait for or cancel any updates or install\uninstall.
2. Make Backups of current /var/lib/
3. Alt+F2 and launch type in gksu gedit /var/lib/
4. Now, search for the exact name of the package with problems and find it.
5. In my case, it I found the entry for the package thunderbird: Half configurated : I'have deleted that information and Ive solved my problem.
| milan_n (novotny-mila) wrote : | #24 |
E: libboost-
E: libgtkglext1: sub-process installed post-removal script returned error status 2
E: libmagick++2: sub-process installed post-removal script returned error status 2
sub-process /usr/bin/dpkg returned error code (1)
I tried to reinstal gimp only. Upper errors appeared and then I tried to remove some libs.
I need some advices to solving my problem.
I have Ubuntu 10.04 LTS - Lucid Lynx
| description: | updated |
| chipppy (chipppy) wrote : Re: [Bug 512096] Re: [MASTER] Exec format error : package failed to install/remove : installation/removal script returned error exit status 2 | #25 |
Good Morning
I am trying to follow the work around instructions but not having full
success yet.
I am using libglew1.5 to replace PACKAGE and that works fine
what do I use to replace PACKAGE_VERSION?? I tried 1.5.2.0ubuntu1 but
that doesn't seem to work
Cheers
chipppy
On Tue, 2010-07-06 at 15:30 +0000, enguerran wrote:
> ** Description changed:
>
> Under some conditions package installation/
> the following error:
>
> -- Error during installation --
> Setting up screenlets (0.1.2-7) ...
> dpkg (subprocess): unable to execute installed post-installation script: Exec format error
> dpkg: error processing screenlets (--configure):
> subprocess installed post-installation script returned error exit status 2
>
> -- Error during removal --
> Removing gnome-do ...
> dpkg (subprocess): unable to execute installed pre-removal script: Exec format error
> dpkg: error processing gnome-do (--purge):
> subprocess installed pre-removal script returned error exit status 2
>
> This error occurs when one of the installation or removal scripts
> (/var/lib/
>
> == HOW TO REPRODUCE ==
> Install a package and emulates a system crash before 30 seconds:
> # apt-get install hello; sleep 20; echo b > /proc/sysrq-trigger
> [simulates a system crash]
> After reboot both installation and removal scripts are 0 bytes. You will notice that hello.list was correctly written to disk because of the fsync call in dpkg/src/filesdb.c
> $ ls -l /var/lib/
> -rw-r--r-- 1 root root 323 2010-02-09 00:42 /var/lib/
> -rwxr-xr-x 1 root root 0 2009-08-15 19:17 /var/lib/
> -rwxr-xr-x 1 root root 0 2009-08-15 19:17 /var/lib/
>
> If you replay the test but adding a sync before the system crash:
> # apt-get install hello; sync; echo b > /proc/sysrq-trigger
> After reboot the files are fine:
> $ ls -l /var/lib/
> -rw-r--r-- 1 root root 323 2010-02-09 00:46 /var/lib/
> -rwxr-xr-x 1 root root 103 2009-08-15 19:17 /var/lib/
> -rwxr-xr-x 1 root root 74 2009-08-15 19:17 /var/lib/
>
> If I adjust /proc/sys/
> time, ( for exemple 1000 in the test above ) then data are correctly
> written to disk.
>
> == WORKAROUNDS ==
> Execute the following commands in a terminal
> (GNOME: Applications -> Accessories -> Terminal
> KDE: KMenu -> Applications -> System -> Terminal [Konsole] )
>
> Workaround A: Remove the package and reinstall
>
> $ sudo rm /var/lib/
> $ sudo apt-get remove --purge PACKAGE
> $ sudo apt-get clean
> $ sudo apt-get update
>
> Then reinstall the package
>
> Workaround B: Finish the install when the package can't be removed
>
> $ sudo apt-get clean
> $ sudo aptitude download PACKAGE
> $ sudo dpkg --unpack ./PACKAGE_
> $ sudo dpkg --configure PACKAGE
>
> Replace PACKAGE with the package name which fails to install/remove.
>
...
| G. MATHEW (babumathew2000) wrote : Re: [Bug 512096] Re: [MASTER] Exec format error : package failed to install/remove : installation/removal script returned error exit status 2 | #26 |
hello
Thanks for the write up. But I cannot do a thing for the machine with
reported problem was stolen and now I am using a borrowed machine which runs
on windows. but thanks for the description you have depicted
chears
GM
On 7 July 2010 01:05, chipppy <email address hidden> wrote:
> Good Morning
>
> I am trying to follow the work around instructions but not having full
> success yet.
>
> I am using libglew1.5 to replace PACKAGE and that works fine
> what do I use to replace PACKAGE_VERSION?? I tried 1.5.2.0ubuntu1 but
> that doesn't seem to work
>
> Cheers
> chipppy
>
> On Tue, 2010-07-06 at 15:30 +0000, enguerran wrote:
> > ** Description changed:
> >
> > Under some conditions package installation/
> > the following error:
> >
> > -- Error during installation --
> > Setting up screenlets (0.1.2-7) ...
> > dpkg (subprocess): unable to execute installed post-installation
> script: Exec format error
> > dpkg: error processing screenlets (--configure):
> > subprocess installed post-installation script returned error exit
> status 2
> >
> > -- Error during removal --
> > Removing gnome-do ...
> > dpkg (subprocess): unable to execute installed pre-removal script: Exec
> format error
> > dpkg: error processing gnome-do (--purge):
> > subprocess installed pre-removal script returned error exit status 2
> >
> > This error occurs when one of the installation or removal scripts
> > (/var/lib/
> >
> > == HOW TO REPRODUCE ==
> > Install a package and emulates a system crash before 30 seconds:
> > # apt-get install hello; sleep 20; echo b > /proc/sysrq-trigger
> > [simulates a system crash]
> > After reboot both installation and removal scripts are 0 bytes. You
> will notice that hello.list was correctly written to disk because of the
> fsync call in dpkg/src/filesdb.c
> > $ ls -l /var/lib/
> > -rw-r--r-- 1 root root 323 2010-02-09 00:42
> /var/lib/
> > -rwxr-xr-x 1 root root 0 2009-08-15 19:17
> /var/lib/
> > -rwxr-xr-x 1 root root 0 2009-08-15 19:17
> /var/lib/
> >
> > If you replay the test but adding a sync before the system crash:
> > # apt-get install hello; sync; echo b > /proc/sysrq-trigger
> > After reboot the files are fine:
> > $ ls -l /var/lib/
> > -rw-r--r-- 1 root root 323 2010-02-09 00:46
> /var/lib/
> > -rwxr-xr-x 1 root root 103 2009-08-15 19:17
> /var/lib/
> > -rwxr-xr-x 1 root root 74 2009-08-15 19:17
> /var/lib/
> >
> > If I adjust /proc/sys/
> > time, ( for exemple 1000 in the test above ) then data are correctly
> > written to disk.
> >
> > == WORKAROUNDS ==
> > Execute the following commands in a terminal
> > (GNOME: Applications -> Accessories -> Terminal
> > KDE: KMenu -> Applications -> System -> Terminal [Konsole] )
> >
> > Workaround A: Remove the package and reinstall
> >
> > $ sudo rm /var/lib/
> > $ sudo apt-get remove -...
| dYp (dubois-yaen-pujol) wrote : | #27 |
hello,
thanks to maria rossi for the clue.
SOLVED :
1. Close Synaptic or any package manager. Wait for or cancel any updates or install\uninstall.
2. Make Backups of current /var/lib/
3. Alt+F2 and launch type in gksu gedit /var/lib/
4. Now, search for the exact name of the package with problems and find it.
5. In my case, it I found the entry for the package nfs-common and nfs-kernel: Half configurated
6. I have deleted that information and I've solved my problem.
| tags: | added: patch |
| Raphaël Hertzog (hertzog) wrote : | #28 |
Maverick and natty have the sync fixes.
| Changed in dpkg (Ubuntu): | |
| status: | Triaged → Fix Released |
| Changed in dpkg (Ubuntu Karmic): | |
| status: | New → Confirmed |
| Donald Larimore Bland jr (dlblandjr) wrote : Re: [Bug 512096] Re: [MASTER] Exec format error : package failed to install/remove : installation/removal script returned error exit status 2 | #29 |
Thanx to everyone, ! this is a great group of engineers !
2011/3/9 Raphaël Hertzog <email address hidden>
> Maverick and natty have the sync fixes.
>
> ** Changed in: dpkg (Ubuntu)
> Status: Triaged => Fix Released
>
> ** Changed in: dpkg (Ubuntu Karmic)
> Status: New => Confirmed
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https:/
>
> Title:
> [MASTER] Exec format error : package failed to install/remove :
> installation/
>
> Status in “dpkg” package in Ubuntu:
> Fix Released
> Status in “dpkg” source package in Karmic:
> Confirmed
> Status in “dpkg” package in Debian:
> Fix Released
>
> Bug description:
> Under some conditions package installation/
> the following error:
>
> -- Error during installation --
> Setting up screenlets (0.1.2-7) ...
> dpkg (subprocess): unable to execute installed post-installation script:
> Exec format error
> dpkg: error processing screenlets (--configure):
> subprocess installed post-installation script returned error exit status
> 2
>
> -- Error during removal --
> Removing gnome-do ...
> dpkg (subprocess): unable to execute installed pre-removal script: Exec
> format error
> dpkg: error processing gnome-do (--purge):
> subprocess installed pre-removal script returned error exit status 2
>
> This error occurs when one of the installation or removal scripts
> (/var/lib/
>
> == HOW TO REPRODUCE ==
> Install a package and emulates a system crash before 30 seconds:
> # apt-get install hello; sleep 20; echo b > /proc/sysrq-trigger
> [simulates a system crash]
> After reboot both installation and removal scripts are 0 bytes. You will
> notice that hello.list was correctly written to disk because of the fsync
> call in dpkg/src/filesdb.c
> $ ls -l /var/lib/
> -rw-r--r-- 1 root root 323 2010-02-09 00:42 /var/lib/
> -rwxr-xr-x 1 root root 0 2009-08-15 19:17
> /var/lib/
> -rwxr-xr-x 1 root root 0 2009-08-15 19:17 /var/lib/
>
> If you replay the test but adding a sync before the system crash:
> # apt-get install hello; sync; echo b > /proc/sysrq-trigger
> After reboot the files are fine:
> $ ls -l /var/lib/
> -rw-r--r-- 1 root root 323 2010-02-09 00:46 /var/lib/
> -rwxr-xr-x 1 root root 103 2009-08-15 19:17
> /var/lib/
> -rwxr-xr-x 1 root root 74 2009-08-15 19:17 /var/lib/
>
> If I adjust /proc/sys/
> time, ( for exemple 1000 in the test above ) then data are correctly
> written to disk.
>
> == WORKAROUNDS ==
> Execute the following commands in a terminal
> (GNOME: Applications -> Accessories -> Terminal
> KDE: KMenu -> Applications -> System -> Terminal [Konsole] )
>
> Workaround A: Remove the package and reinstall
>
> $ sudo rm /var/lib/
> $ sudo apt-get remove --purge PACKAGE
> $ sudo apt-get clean
> $ sudo apt-get upda...
| Changed in dpkg (Ubuntu Karmic): | |
| status: | Confirmed → Won't Fix |
| description: | updated |
| description: | updated |
| tags: | added: iso-testing |
| Francewhoa (francewhoa) wrote : | #30 |
Confirming this issue. Same here upgrading from 8.04 to 10.04.1 caused the problem to appear.
All above solutions didn't work in my case. The following worked. In Terminal:
-------
sudo rm /var/lib/
sudo rm /var/lib/
sudo rm /var/lib/
sudo dpkg --force all --purge flashplugin-nonfree
-------
Thanks to sandyd http://
LinkedIn
------------
Bug,
I'd like to add you to my professional network on LinkedIn.
- George
George Mathew
Senior Lecturer at Ministry of Health
Botswana
Confirm that you know George Mathew:
https:/
--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://
(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.


Here is a patch proposal which add some fsync on files and directories to prevent delayed allocation and the zero-length file problem after a system crash.