package linux-image-3.5.0-39-generic 3.5.0-39.60~precise1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 17

Bug #1221138 reported by Pascal Mons
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Low
Unassigned

Bug Description

unable to install properly linux kernel 3.5.0-39
heeeeeee I get errors when updddddding Graphviz

installArchives() failed: (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 ... 1327697 files and directories currently installed.)
Preparing to replace boot-sav 3.199~ppa24~precise (using .../boot-sav_3.199~ppa25~precise_all.deb) ...
Unpacking replacement boot-sav ...
Preparing to replace boot-repair 3.199~ppa24~precise (using .../boot-repair_3.199~ppa25~precise_all.deb) ...
Unpacking replacement boot-repair ...
Preparing to replace boot-sav-extra 3.199~ppa24~precise (using .../boot-sav-extra_3.199~ppa25~precise_all.deb) ...
Unpacking replacement boot-sav-extra ...
Preparing to replace libgraphviz-dev 2.33.20130903.0446-1~precise (using .../libgraphviz-dev_2.33.20130905.0447-1~precise_amd64.deb) ...
Unpacking replacement libgraphviz-dev ...
Preparing to replace libgraphviz4 2.33.20130903.0446-1~precise (using .../libgraphviz4_2.33.20130905.0447-1~precise_amd64.deb) ...
Unpacking replacement libgraphviz4 ...
Preparing to replace graphviz 2.33.20130903.0446-1~precise (using .../graphviz_2.33.20130905.0447-1~precise_amd64.deb) ...
Unpacking replacement graphviz ...
Preparing to replace graphviz-dev 2.33.20130903.0446-1~precise (using .../graphviz-dev_2.33.20130905.0447-1~precise_all.deb) ...
Unpacking replacement graphviz-dev ...
Preparing to replace libgv-guile 2.33.20130903.0446-1~precise (using .../libgv-guile_2.33.20130905.0447-1~precise_amd64.deb) ...
Unpacking replacement libgv-guile ...
Preparing to replace libgv-lua 2.33.20130903.0446-1~precise (using .../libgv-lua_2.33.20130905.0447-1~precise_amd64.deb) ...
Unpacking replacement libgv-lua ...
Preparing to replace libgv-ocaml 2.33.20130903.0446-1~precise (using .../libgv-ocaml_2.33.20130905.0447-1~precise_amd64.deb) ...
Unpacking replacement libgv-ocaml ...
Preparing to replace libgv-perl 2.33.20130903.0446-1~precise (using .../libgv-perl_2.33.20130905.0447-1~precise_amd64.deb) ...
Unpacking replacement libgv-perl ...
Preparing to replace libgv-php5 2.33.20130903.0446-1~precise (using .../libgv-php5_2.33.20130905.0447-1~precise_amd64.deb) ...
Unpacking replacement libgv-php5 ...
Preparing to replace libgv-python 2.33.20130903.0446-1~precise (using .../libgv-python_2.33.20130905.0447-1~precise_amd64.deb) ...
Unpacking replacement libgv-python ...
Preparing to replace libgv-ruby 2.33.20130903.0446-1~precise (using .../libgv-ruby_2.33.20130905.0447-1~precise_amd64.deb) ...
Unpacking replacement libgv-ruby ...
Preparing to replace libgv-tcl 2.33.20130903.0446-1~precise (using .../libgv-tcl_2.33.20130905.0447-1~precise_amd64.deb) ...
Unpacking replacement libgv-tcl ...
Preparing to replace os-uninstaller 3.199~ppa24~precise (using .../os-uninstaller_3.199~ppa25~precise_all.deb) ...
Unpacking replacement os-uninstaller ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for man-db ...
Processing triggers for menu ...
Setting up linux-image-3.5.0-39-generic (3.5.0-39.60~precise1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Failed to symbolic-link /boot/initrd.img-3.5.0-39-generic to initrd.img:File exists at /var/lib/dpkg/info/linux-image-3.5.0-39-generic.postinst line 614.
dpkg: error processing linux-image-3.5.0-39-generic (--configure):
 subprocess installed post-installation script returned error exit status 17
dpkg: dependency problems prevent configuration of linux-image-generic-lts-quantal:
 linux-image-generic-lts-quantal depends on linux-image-3.5.0-39-generic; however:
  Package linux-image-3.5.0-39-generic is not configured yet.
dpkg: error processing linux-image-generic-lts-quantal (--configure):
 dependency problems - leaving unconfigured
Setting up boot-sav (3.199~ppa25~precise) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up boot-repair (3.199~ppa25~precise) ...
Setting up boot-sav-extra (3.199~ppa25~precise) ...
Setting up libgraphviz4 (2.33.20130905.0447-1~precise) ...
Setting up libgraphviz-dev (2.33.20130905.0447-1~precise) ...
Setting up graphviz (2.33.20130905.0447-1~precise) ...
Setting up graphviz-dev (2.33.20130905.0447-1~precise) ...
Setting up libgv-guile (2.33.20130905.0447-1~precise) ...
Setting up libgv-lua (2.33.20130905.0447-1~precise) ...
Setting up libgv-ocaml (2.33.20130905.0447-1~precise) ...
Setting up libgv-perl (2.33.20130905.0447-1~precise) ...
Setting up libgv-php5 (2.33.20130905.0447-1~precise) ...
Setting up libgv-python (2.33.20130905.0447-1~precise) ...
Setting up libgv-ruby (2.33.20130905.0447-1~precise) ...
Setting up libgv-tcl (2.33.20130905.0447-1~precise) ...
Setting up os-uninstaller (3.199~ppa25~precise) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for menu ...
Errors were encountered while processing:
 linux-image-3.5.0-39-generic
 linux-image-generic-lts-quantal
Setting up linux-image-3.5.0-39-generic (3.5.0-39.60~precise1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Failed to symbolic-link /boot/initrd.img-3.5.0-39-generic to initrd.img:File exists at /var/lib/dpkg/info/linux-image-3.5.0-39-generic.postinst line 614.
dpkg: error processing linux-image-3.5.0-39-generic (--configure):
 subprocess installed post-installation script returned error exit status 17
dpkg: dependency problems prevent configuration of linux-image-generic-lts-quantal:
 linux-image-generic-lts-quantal depends on linux-image-3.5.0-39-generic; however:
  Package linux-image-3.5.0-39-generic is not configured yet.
dpkg: error processing linux-image-generic-lts-quantal (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: linux-image-3.5.0-39-generic 3.5.0-39.60~precise1
ProcVersionSignature: Ubuntu 3.2.0-52.78-generic 3.2.48
Uname: Linux 3.2.0-52-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 2.0.1-0ubuntu17.4
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: jean 4168 F.... pulseaudio
 /dev/snd/controlC0: jean 4168 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfe7f8000 irq 47'
   Mixer name : 'Analog Devices AD1989B'
   Components : 'HDA:11d4989b,10438311,00100300'
   Controls : 49
   Simple ctrls : 27
Card1.Amixer.info:
 Card hw:1 'HDMI'/'HDA ATI HDMI at 0xfe8fc000 irq 48'
   Mixer name : 'ATI R6xx HDMI'
   Components : 'HDA:1002aa01,00aa0100,00100000'
   Controls : 6
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'IEC958',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
Date: Thu Sep 5 06:10:47 2013
DuplicateSignature: package:linux-image-3.5.0-39-generic:3.5.0-39.60~precise1:subprocess installed post-installation script returned error exit status 17
ErrorMessage: subprocess installed post-installation script returned error exit status 17
HibernationDevice: RESUME=UUID=56f1614b-e623-409d-964c-196da18217cc
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MachineType: System manufacturer P5Q3 DELUXE
MarkForUpload: True
ProcFB: 0 radeondrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.2.0-52-generic root=UUID=b6659b8e-576f-4ae3-aca2-d714dc39b2d9 ro quiet splash vt.handoff=7
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions: grub-pc N/A
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
StagingDrivers: zram
Title: package linux-image-3.5.0-39-generic 3.5.0-39.60~precise1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 17
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/26/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 2105
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P5Q3 DELUXE
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr2105:bd05/26/2009:svnSystemmanufacturer:pnP5Q3DELUXE:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP5Q3DELUXE:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: P5Q3 DELUXE
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Pascal Mons (anton+) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
tags: added: quantal
tags: removed: need-duplicate-check
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

You may need to run the following:

sudo apt-get install -f
sudo apt-get clean
sudo apt-get update

Then re-install the package.

If that does not resolve your issue, please mark the bug as "Confirmed"

Changed in linux (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Pascal Mons (anton+) wrote :

Well, there is indeed a bug in the file /var/lib/dpkg/info/linux-image-3.5.0-39-generic.postinst

I substituted all (four) occurrences of pwd in /var/lib/dpkg/info/linux-image-3.2.0-34-generic.postinst with getcwd() and now everything seems to work ...

The solution is explained at large @ http://askubuntu.com/questions/233798/linux-image-generic-seems-to-be-broken

pwd doesn't work from within perl apparently, it just returns an empty string.

In any case, I'm fairly certain that it's a bug that the postinst script calls pwd instead of using Perl's own Cwd like it ought to.

pwd is a bash shell command line / bourne shell.

Would you please update the linux-image-3.5.0-39-generic.postinst script accordingly ? and the bug status if I couldn't update it.

Thanks.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Pascal Mons (anton+) wrote :

In my case it was a substitution in /var/lib/dpkg/info/linux-image-3.5.0-39-generic.postinst

Not the /var/lib/dpkg/info/linux-image-3.2.0-34-generic.postinst mentionned on the askubuntu.com website.

Revision history for this message
Pascal Mons (anton+) wrote :

The relevant error message was (from the reported error above)

Failed to symbolic-link /boot/initrd.img-3.5.0-39-generic to initrd.img:File exists at /var/lib/dpkg/info/linux-image-3.5.0-39-generic.postinst line 614.

Revision history for this message
Pascal Mons (anton+) wrote :

A couple of days before I installed the kernel 3.5.0-40 through the regular Ubuntu Update process and all went fine. I did check the /var/lib/dpkg/info/linux-image-3.5.0-40-generic.postrm file and it still sported the 4 occurences of pwd in this instruction :

chomp($cwd = `pwd`);

When first installing the Quantal kernel backport there was no problem and subsequent updates went fine. However the automatic update process did install a 3.5.0 kernel recent version (far above the 40 currently supported). I did not pay attention to the GRUB boot screen which was still showing that the 3.5.0-39 was used by my Ubuntu 12.04 system and I removed as usual the older(s) kernels from my /boot partition. Following this I had to boot through th regular 3.2 kernel and I did re-install the kernel 3.5.0-39 through the following precedure coming from an official Ubuntu website :

1) Add the X-team ppa (https://launchpad.net/~ubuntu-x-swat/+archive/q-lts-backport)
sudo add-apt-repository ppa:ubuntu-x-swat/q-lts-backport
2) Update apt and install the new kernel
sudo apt-get update && sudo apt-get install linux-image-generic-lts-quantal linux-headers-generic-lts-quantal
3) Restart your computer to boot into the new kernel

However I was faced with the reported bug :
package linux-image-3.5.0-39-generic 3.5.0-39.60~precise1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 17

Only after replacing all occurences of pwd by getcwd() within /var/lib/dpkg/info/linux-image-3.2.0-34-generic.postinst , did I succeed to re-install the Quantal backport of 3.5.0-39 in Precise 12.04

For information before re-installing I did the following to remove the Quantal kernel :

1) Install ppa-purge
sudo apt-get install ppa-purge
2) Remove the ppa
sudo ppa-purge ppa:ubuntu-x-swat/q-lts-backport
3) PPA Purge will find the packages installed and offered to downgrade them.
Say yes and ppa-purge will remove the upgraded versions and reinstall the versions from the archive.
4) Remove the meta packages
sudo apt-get remove --purge linux-image-generic-lts-quantal linux-headers-generic-lts-quantal
5) Remove the kernel itself. While running the new kernel, enter the following command
uname -r
This returns a number, like '3.5.0-8-generic'. Use the number (3.5.0-8) to replace the word KERNEL
sudo apt-get remove --purge linux-image-KERNEL-generic linux-headers-KERNEL linux-headers-KERNEL-generic
sudo apt-get autoremove
Eg, for '3.5.0-8'
sudo apt-get remove --purge linux-image-3.5.0-8-generic linux-headers-3.5.0-8 linux-headers-3.5.0-8

In short the used :

chomp($cwd = `pwd`);

is working as it did before, however I am not sure weather the problem would re-appear following a full un-install / re-install.

the solution was to use :

chomp($cwd=`getcwd()`);

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

3.5 EOL,
please feel free to open a new bug if you're still encounter this issue with newer releases.

Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Pascal Mons (anton+) wrote :

I didn't see this recurring in newer releases.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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