package apport 1.0-0ubuntu5 failed to install/upgrade: subprocess new pre-removal script returned error exit status 2

Bug #369658 reported by Dmitry Murat
104
This bug affects 13 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Jaunty by Marco Rodrigues

Bug Description

Binary package hint: apport

Just pressed Install Updates button in auto-opened Update Manager and installed all today updates but one. Screenshot of the install error attached.

ProblemType: Package
Architecture: amd64
CrashReports:
 600:0:0:315757:2009-04-30 09:06:44.000000000 +0400:2009-04-30 09:06:53.000000000 +0400:/var/crash/apport.0.crash
 600:0:0:305791:2009-04-29 00:34:10.000000000 +0400:2009-04-29 00:36:20.000000000 +0400:/var/crash/splashy.0.crash
DistroRelease: Ubuntu 9.04
ErrorMessage: subprocess new pre-removal script returned error exit status 2
NonfreeKernelModules: nvidia
Package: apport 1.0-0ubuntu5
PackageArchitecture: all
SourcePackage: apport
Title: package apport 1.0-0ubuntu5 failed to install/upgrade: subprocess new pre-removal script returned error exit status 2
Uname: Linux 2.6.28-11-generic x86_64

Revision history for this message
Dmitry Murat (dmitry-murat) wrote :
Revision history for this message
hisotaso (flirm777) wrote :

Same here, although i'm and intel machine.

Revision history for this message
Claus007 (claus-ilginnis-deactivatedaccount) wrote :

exactly the same 24: runlevel: not found

Revision history for this message
Dmitry Murat (dmitry-murat) wrote :

I think the package was updated at the moment because it has been installed well. So I think it's OK to close this bug.

mist@ubuntu:~$ apt-cache policy apport
apport:
  Installed: 1.0-0ubuntu5.2
  Candidate: 1.0-0ubuntu5.2
  Version table:
 *** 1.0-0ubuntu5.2 0
        500 http://ru.archive.ubuntu.com jaunty-updates/main Packages
        500 http://security.ubuntu.com jaunty-security/main Packages
        100 /var/lib/dpkg/status
     1.0-0ubuntu5 0
        500 http://ru.archive.ubuntu.com jaunty/main Packages

Revision history for this message
Dmitry Murat (dmitry-murat) wrote :

At the moment no apport update can be found in Update Manager window and "sudo apt-get install apport" tells me that I have the latest version installed.

Changed in apport (Ubuntu):
status: New → Fix Released
Revision history for this message
squid1230 (tobias-schmid) wrote :

The following packages will be upgraded:
  apport
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 0B/113kB of archives.
After this operation, 0B of additional disk space will be used.
(Reading database ... 125561 files and directories currently installed.)
Preparing to replace apport 1.0-0ubuntu5 (using .../apport_1.0-0ubuntu5.2_all.deb) ...
 * Stopping automatic crash report generation: apport /etc/init.d/apport: 24: runlevel: not found
exit: 24: Illegal number: Stopping
invoke-rc.d: initscript apport, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 2
dpkg - trying script from the new package instead ...
 * Stopping automatic crash report generation: apport /etc/init.d/apport: 24: runlevel: not found
exit: 24: Illegal number: Stopping
invoke-rc.d: initscript apport, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/apport_1.0-0ubuntu5.2_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/apport_1.0-0ubuntu5.2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Zombywuf (t-launchpad-zombywuf-org) wrote :

The problem is that the script /etc/init.d/apport sets the PATH variable to /bin. It then tries to use the runlevel command to stop itself, but runlevel is in /sbin. The quick fix is to change the line:
PATH=/bin
to
PATH=/bin:/sbin
in /etc/init.d/apport

Revision history for this message
Kevin Merigot (kevin-merigot) wrote : Re: [Bug 369658] Re: package apport 1.0-0ubuntu5 failed to install/upgrade: subprocess new pre-removal script returned error exit status 2

\o/ IT WORKS ! Thank you very much !

sudo vim /etc/init.d/apport
changed PATH=/bin to PATH=/bin:/sbin and saved
sudo apt-get upgrade

No soucy ! :)

Zombywuf a écrit :
> The problem is that the script /etc/init.d/apport sets the PATH variable to /bin. It then tries to use the runlevel command to stop itself, but runlevel is in /sbin. The quick fix is to change the line:
> PATH=/bin
> to
> PATH=/bin:/sbin
> in /etc/init.d/apport
>
>

Revision history for this message
kikola (nvelkovski-hotmail) wrote :

yup same here! it just worked!

thanks

Revision history for this message
gamersint (codedvlpr) wrote :

ditto here as well, worked liked a charm!

thanks for the FYI

Revision history for this message
PGTips91 (paulgtaylor91-gmail) wrote :

sudo gedit /etc/init.d/apport worked for me, thank you.

Changed in apport (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Philip Muškovac (yofel) wrote :

Apport uses upstart by now so this is fixed.

Changed in apport (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.