web-dev-qa-db-fra.com

linux-image-generic semble être cassé

J'utilise Ubuntu 12.04. Récemment, je ne peux plus rien installer. Je reçois toujours le message d'erreur suivant:

Setting up linux-image-3.2.0-34-generic (3.2.0-34.53) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Use of chdir('') or chdir(undef) as chdir() is deprecated at /var/lib/dpkg/inf/linux-image-3.2.0-34-generic.postinst line 235.
Failed to symbolic-link /boot/initrd.img-3.2.0-34-generic to initrd.img:File exists at /var/lib/dpkg/info/linux-image-3.2.0-34-generic.postinst line 614.
dpkg: error processing linux-image-3.2.0-34-generic (--configure):
 subprocess installed post-installation script returned error exit status 17
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.2.0-34-generic; however:
  Package linux-image-3.2.0-34-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 3.2.0.34.37); however:
  Package linux-image-generic is not configured yet.
dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
Setting up dselect (1.16.1.2ubuntu7) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                         No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
 linux-image-3.2.0-34-generic
 linux-image-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Le résultat de dpkg -C est:

The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure menu option in dselect for them to work:
 linux-image-generic  Generic Linux kernel image
 linux-generic        Complete Generic Linux kernel

The following packages are only half configured, probably due to problems configuring them the first time. The configuration should be retried using dpkg --configure <package> or the configure menu option in dselect:
 linux-image-3.2.0-34-generic Linux kernel image for version 3.2.0 on 32 bit x8

mais dpkg --configure linux-image-3.2.0-34-generic linux-image-generic linux-generic entraîne le message d'erreur suivant:

Setting up linux-image-3.2.0-34-generic (3.2.0-34.53) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Use of chdir('') or chdir(undef) as chdir() is deprecated at /var/lib/dpkg/inf/linux-image-3.2.0-34-generic.postinst line 235.
Failed to symbolic-link /boot/initrd.img-3.2.0-34-generic to initrd.img:File exists at /var/lib/dpkg/info/linux-image-3.2.0-34-generic.postinst line 614.
dpkg: error processing linux-image-3.2.0-34-generic (--configure):
 subprocess installed post-installation script returned error exit status 17
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.2.0-34-generic; however:
  Package linux-image-3.2.0-34-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 3.2.0.34.37); however:
  Package linux-image-generic is not configured yet.
dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-3.2.0-34-generic
 linux-image-generic
 linux-generic

Je serais très heureux si quelqu'un pouvait m'aider avec ce problème!

3
nalvory

Vous avez une fausse commande pwd (répertoire de travail d'impression), en quelque sorte. J'ai jeté un coup d'oeil à la ligne référencée dans le script postinst. Il essaie de "sauvegarder" le répertoire de travail en stockant la sortie de pwd dans une variable, puis sur la ligne référencée, en revenant à ce répertoire après avoir effectué quelques opérations dans d'autres répertoires. Le problème se produit parce que la pwd appelée en quelque sorte a une sortie vide.

Exécutez la commande which pwd. Si la sortie n'est pas /bin/pwd, trouvez pourquoi et corrigez-le.

1
tgies