here is my problem i can't remove the click package :

aptitude -f remove click
Les paquets suivants seront ENLEVÉS :                   
0 paquets mis à jour, 0 nouvellement installés, 1 à enlever et 2 non mis à jour.
Il est nécessaire de télécharger 0 o d'archives. Après dépaquetage, 88,1 ko seront libérés.
(Lecture de la base de données... 551823 fichiers et répertoires déjà installés.)
Suppression de click (0.4.43+16.04.20160203-0ubuntu2) ...
Traceback (most recent call last):
  File "/usr/bin/click", line 32, in <module>
    gi.require_version('Click', '0.4')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 102, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Click not available
dpkg: erreur de traitement du paquet click (--remove) :
 le sous-processus script pre-removal installé a retourné une erreur de sortie d'état 1
Job for click-system-hooks.service failed because the control process exited with error code. See "systemctl status click-system-hooks.service" and "journalctl -xe" for details.
click-system-hooks.service couldn't start.
Des erreurs ont été rencontrées pendant l'exécution :
E: Sub-process /usr/bin/dpkg returned an error code (1)
Impossible d'effectuer l'opération demandée sur le paquet. Essai de récupération :
  • Try apt purge click – user689314 Jun 28 '17 at 12:36
  • i did but it's not working ... same error – user462794 Jun 29 '17 at 9:49

The problem is that there is a bug in the click install/remove scripts (located in /var/lib/dpkg/info/click*)


The issue is that click-system-hooks.service (systemd unit) needs to be running and report backs its status otherwise the install/remove script sees the status is not good and crashes out. The work around is either to either modify the install/remove scripts to ignore the status or to manually get the service up and running before trying to install/upgrade/remove the package.

Althought unlikely for most user, make sure you have not installed a local python package also called click which causes a namespace clash.

When click is finally removed, do a final check in /etc/systemd (particularl under the directory /etc/systemd/user) and delete any hanging symbolic links to the click service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.