Il arrive parfois que lors d'une installation d'un packet il y ait une erreur et que l'installation ne se termine pas, et que suite a cela on ne puisse plus utiliser son gestionnaire de package. Pour cela, la seule solution est de supprimer le broken package a la mano. Voici l'erreur que j'ai eu:

root@owe-team:/var/lib/dpkg/info# aptitude install iptables

The following partially installed packages will be configured:
  cgroupfs-mount

No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up cgroupfs-mount (1.1~bpo70+1) ...
[FAIL] cgroupfs-mount is managed via upstart, try using service cgroupfs-mount start ... failed!

invoke-rc.d: initscript cgroupfs-mount, action "start" failed.
dpkg: error processing cgroupfs-mount (--configure):
 subprocess installed post-installation script returned error exit status 1

Errors were encountered while processing:
 cgroupfs-mount
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up cgroupfs-mount (1.1~bpo70+1) ...
[FAIL] cgroupfs-mount is managed via upstart, try using service cgroupfs-mount start ... failed!

invoke-rc.d: initscript cgroupfs-mount, action "start" failed.
dpkg: error processing cgroupfs-mount (--configure):
 subprocess installed post-installation script returned error exit status 1

Errors were encountered while processing:
 cgroupfs-mount

Suite a ça on peut voir que le package:cgroupfs-mount est broken.

Errors were encountered while processing:
 cgroupfs-mount

On va donc supprimer les fichiers de ce package ainsi que le desinstaller, et ce, avec les commandes suivantes.

root@owe-team:/var/lib/dpkg/info# mv /var/lib/dpkg/info/cgroupfs-mount.* /tmp/
root@owe-team:/var/lib/dpkg/info# dpkg --remove --force-remove-reinstreq cgroupfs-mount

Si suite a la derniere commande lancée, vous obtenez ceci:

(Reading database ... 116079 files and directories currently installed.)
Removing cgroupfs-mount ...

C'est que la suppression du package a fonctionné.
Maintenant vous pouvez a nouveau utiliser votre gestionnaire de package préféré.

wiki/reparer_un_package_casse.txt · Dernière modification: 2018/04/23 19:13 (modification externe)
CC0 1.0 Universal
Powered by PHP Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Valid HTML5