L’opération "Installer l’application kanboard'' a échoué

Bonjour à toutes et à tous,

Mon serveur YunoHost

Matériel: VPS acheté en ligne
Version de YunoHost: 3.8.4.7 (stable)
J’ai accès à mon serveur : En SSH | Par la webadmin …
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

J’ai utilisé la webadmin pour lancer lancer l’installation de Kanboard mais elle échoue.

Les logs sont ici: https://paste.yunohost.org/raw/qiyuketano

Les messages d’erreur de la console.

L’opération 'Installer l’application 'kanboard'' a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en cliquant ici
Removal of kanboard completed
Removing the dedicated system user...
The user kanboard was not found
'/etc/fail2ban/filter.d/kanboard.conf' wasn't deleted because it doesn't exist.
'/etc/fail2ban/jail.d/kanboard.conf' wasn't deleted because it doesn't exist.
Removing fail2ban configuration...
'/etc/php/7.0/fpm/pool.d/kanboard.conf' wasn't deleted because it doesn't exist.
Removing php-fpm configuration...
'/etc/nginx/conf.d/lrouff.net.d/kanboard.conf' wasn't deleted because it doesn't exist.
Removing nginx web server configuration...
Removing app main directory...
ynh_secure_remove called with empty argument, ignoring.
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
Removing the MySQL database...
Removing dependencies...
Loading installation settings...
Supprimer l’application après l’échec de l’installation …
L’opération 'Installer l’application 'kanboard'' a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en cliquant ici
Impossible d’installer kanboard : Une erreur est survenue dans le script d’installation de l’application
Unable to install dependencies
E: Package 'php-dom' has no installation candidate
E: Packages need to be removed but remove is disabled.
Installing dependencies...
Storing installation settings...
Validating installation parameters...
Installation de l’application kanboard …

D’avance merci pour m’aiguiller vers une piste.

Laurent.

Salut,

est-ce que tu peux regarder manuellement ce que raconte :

apt install -s php-dom

et partager le contenu de la conf apt:

cat /etc/apt/preferences.d/extra_php_version

Bonjour Aleks,

Voici pour la première commande:

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Le paquet php-dom est un paquet virtuel fourni par :
  php7.4-xml 7.4.6-1+0~20200514.17+debian9~1.gbp0f509e
  php7.0-xml 7.0.33-29+0~20200514.36+debian9~1.gbp126f6f
Vous devez explicitement sélectionner un paquet à installer.

E: Le paquet « php-dom » n'a pas de version susceptible d'être installée

Et, sur ma configuration, il n’y a pas de fichier extra_php_version dans le répertoire /etc/apt/preferences.d

cat: /etc/apt/preferences.d/extra_php_version: Aucun fichier ou dossier de ce type

Voila.

Laurent.

Hmokay, chelou … j’imagine que tu as quand meme quelque chose en renvoi de cette commande :

grep -nr "sury" /etc/apt/sources.list*

Mais bref, tu devrais pouvoir t’en sortir en faisant

apt install php7.0-xml

J’ai ouvert une issue pour parler de ce cas et comment le corriger de manière globale:

Oui, la commande:

grep -nr "sury" /etc/apt/sources.list*

Me renvoi:

/etc/apt/sources.list.d/sury.list:1:# deb https://packages.sury.org/php/ stretch main

et le paquet php7.0-xml semble déjà installé:

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
php7.0-xml is already the newest version (7.0.33-29+0~20200514.36+debian9~1.gbp126f6f).
php7.0-xml passé en « installé manuellement ».

:thinking:

Laurent

Erf ok … alors heu tentons ça :

apt install php7.0-dom

J’ai peur que ce soit pareil:

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Note : sélection de « php7.0-xml » au lieu de « php7.0-dom »
php7.0-xml is already the newest version (7.0.33-29+0~20200514.36+debian9~1.gbp126f6f).
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.

Et donc là t’as toujours apt install php-dom qui donne le même résultat qu’avant ?

C’est ça. Je suis loin d’être un expert mais lorsque je fais “apt install php7.0-dom”, cela semble sélectionner php7.0-xml et me renvoie le fait qu’il est déjà installé.

Mouarf bon bah à mon avis c’est un bug dans apt … Je comprends pas pourquoi il veut pas voir que php-dom est bien “installé” (enfin après c’est un paquet virtuel alors le comportement est chelou >.>)

Bref, j’ai fais un fix sur l’app pour demander php7.0-xml explicitement plutôt que php-dom. c.f. https://github.com/YunoHost-Apps/kanboard_ynh/pull/94

Si tu veux, tu peux tester l’install en ligne de commande avec :

yunohost app install https://github.com/YunoHost-Apps/kanboard_ynh/tree/fix-php-dom-dep

Ok merci, je vais essayer

Je crois que le fix ne fonctionne pas, voici les log:

nfo : Installation de l’application kanboard …
Info : [....................] > Validating installation parameters...
Info : [....................] > Storing installation settings...
Info : [++++++..............] > Installing dependencies...
Attention : E: Packages need to be removed but remove is disabled.
Attention : E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Attention : You might want to run 'apt --fix-broken install' to correct these.
Attention : The following packages have unmet dependencies:
Attention :  php-zip : Depends: php7.0-zip but it is not going to be installed
Attention : Unable to install dependencies
Erreur : Impossible d’installer kanboard : Une erreur est survenue dans le script d’installation de l’application
Info : L’opération 'Installer l’application 'kanboard'' a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en utilisant la commande 'yunohost log display 20200605-142219-app_install-kanboard --share'
Attention : Here's an extract of the logs before the crash. It might help debugging the error:
Info : DEBUG - Building dependency tree...
Info : DEBUG - Reading state information...
Info : DEBUG - Correcting dependencies... Done
Info : DEBUG - The following packages will be REMOVED:
Info : WARNING - E: Packages need to be removed but remove is disabled.
Info : DEBUG -   kanboard-ynh-deps
Info : DEBUG - 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Info : DEBUG - ++ sed s/,//g
Info : DEBUG - ++ sed 's/^ Depends: //'
Info : DEBUG - ++ grep Depends
Info : DEBUG - ++ dpkg --info /tmp/tmp.S3ol00JA09/kanboard-ynh-deps_1.2.12~ynh1_all.deb
Info : DEBUG - + local 'dependencies=php-gd php-zip php7.0-dom php-mbstring'
Info : DEBUG - + sed --quiet '/--fix-broken/,$p'
Info : DEBUG - + ynh_package_install php-gd php-zip php7.0-dom php-mbstring --dry-run
Info : DEBUG - + ynh_apt --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install php-gd php-zip php7.0-dom php-mbstring --dry-run
Info : DEBUG - + ynh_wait_dpkg_free
Info : DEBUG - + return 0
Info : DEBUG - + LC_ALL=C
Info : DEBUG - + DEBIAN_FRONTEND=noninteractive
Info : DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install php-gd php-zip php7.0-dom php-mbstring --dry-run
Info : DEBUG - + ynh_die '--message=Unable to install dependencies'
Attention : Supprimer l’application après l’échec de l’installation …
Info : [....................] > Loading installation settings...
Info : [+++++++.............] > Removing dependencies...
Attention : ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
Info : [#######+++..........] > Removing the MySQL database...
Attention : ynh_secure_remove called with empty argument, ignoring.
Info : [##########..........] > Removing app main directory...
Info : [##########+.........] > Removing nginx web server configuration...
Info : '/etc/nginx/conf.d/lrouff.net.d/kanboard.conf' wasn't deleted because it doesn't exist.
Info : [###########+........] > Removing php-fpm configuration...
Info : '/etc/php/7.0/fpm/pool.d/kanboard.conf' wasn't deleted because it doesn't exist.
Info : [############+++++...] > Removing fail2ban configuration...
Info : '/etc/fail2ban/jail.d/kanboard.conf' wasn't deleted because it doesn't exist.
Info : '/etc/fail2ban/filter.d/kanboard.conf' wasn't deleted because it doesn't exist.
Attention : The user kanboard was not found
Info : [#################++.] > Removing the dedicated system user...
Info : [####################] > Removal of kanboard completed
Erreur : L’opération 'Installer l’application 'kanboard'' a échoué ! 

Zblerg … bon alors regardons ce que dit

apt install php7.0-zip

Je crois que l’on se rapproche du problème:

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Certains paquets ne peuvent être installés. Ceci peut signifier
que vous avez demandé l'impossible, ou bien, si vous utilisez
la distribution unstable, que certains paquets n'ont pas encore
été créés ou ne sont pas sortis d'Incoming.
L'information suivante devrait vous aider à résoudre la situation : 

Les paquets suivants contiennent des dépendances non satisfaites :
 php7.0-zip : Dépend: php7.0-common (= 7.0.33-0+deb9u7) mais 7.0.33-29+0~20200514.36+debian9~1.gbp126f6f devra être installé
E: Impossible de corriger les problèmes, des paquets défectueux sont en mode « garder en l'état ».

Hmokay est-ce que tu peux montrer le resultat de

ls -l /etc/apt/preferences.d/

et

apt policy php7.0-zip

Ça donne:

total 4
-rw-r--r-- 1 root root 59 août   6  2019 zabbix

et

php7.0-zip:
  Installé : (aucun)
  Candidat : 7.0.33-0+deb9u7
 Table de version :
     7.0.33-0+deb9u7 500
        500 http://security.debian.org stretch/updates/main amd64 Packages
     7.0.33-0+deb9u6 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages

Alright, c’est un peu chelou mais si tu fais :

rm /etc/apt/sources.list.d/sury.list

puis retente l’install ça devrait marcher …

Je suis désolé de te faire perdre ton temps mais que ce soit avec la méthode classique (Webadmin) ou avec ton fix, l’installation ne fonctionne pas.
Voici les logs avec ton fix:

Info : Installation de l’application kanboard …
Info : [....................] > Validating installation parameters...
Info : [....................] > Storing installation settings...
Info : [++++++..............] > Installing dependencies...
Attention : E: Packages need to be removed but remove is disabled.
Attention : E: Package 'php-mbstring' has no installation candidate
Attention : Unable to install dependencies
Erreur : Impossible d’installer kanboard : Une erreur est survenue dans le script d’installation de l’application
Info : L’opération 'Installer l’application 'kanboard'' a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en utilisant la commande 'yunohost log display 20200605-145945-app_install-kanboard --share'
Attention : Here's an extract of the logs before the crash. It might help debugging the error:
Info : DEBUG - Building dependency tree...
Info : DEBUG - Reading state information...
Info : DEBUG - Correcting dependencies... Done
Info : DEBUG - The following packages will be REMOVED:
Info : WARNING - E: Packages need to be removed but remove is disabled.
Info : DEBUG -   kanboard-ynh-deps
Info : DEBUG - 0 upgraded, 0 newly installed, 1 to remove and 9 not upgraded.
Info : DEBUG - ++ sed s/,//g
Info : DEBUG - ++ sed 's/^ Depends: //'
Info : DEBUG - ++ grep Depends
Info : DEBUG - ++ dpkg --info /tmp/tmp.NhjKfRjpei/kanboard-ynh-deps_1.2.12~ynh1_all.deb
Info : DEBUG - + local 'dependencies=php-gd php-zip php7.0-dom php-mbstring'
Info : DEBUG - + sed --quiet '/--fix-broken/,$p'
Info : DEBUG - + ynh_package_install php-gd php-zip php7.0-dom php-mbstring --dry-run
Info : DEBUG - + ynh_apt --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install php-gd php-zip php7.0-dom php-mbstring --dry-run
Info : DEBUG - + ynh_wait_dpkg_free
Info : DEBUG - + return 0
Info : DEBUG - + LC_ALL=C
Info : DEBUG - + DEBIAN_FRONTEND=noninteractive
Info : DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install php-gd php-zip php7.0-dom php-mbstring --dry-run
Info : DEBUG - + ynh_die '--message=Unable to install dependencies'
Attention : Supprimer l’application après l’échec de l’installation …
Info : [....................] > Loading installation settings...
Info : [+++++++.............] > Removing dependencies...
Attention : ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
Info : [#######+++..........] > Removing the MySQL database...
Attention : ynh_secure_remove called with empty argument, ignoring.
Info : [##########..........] > Removing app main directory...
Info : [##########+.........] > Removing nginx web server configuration...
Info : '/etc/nginx/conf.d/lrouff.net.d/kanboard.conf' wasn't deleted because it doesn't exist.
Info : [###########+........] > Removing php-fpm configuration...
Info : '/etc/php/7.0/fpm/pool.d/kanboard.conf' wasn't deleted because it doesn't exist.
Info : [############+++++...] > Removing fail2ban configuration...
Info : '/etc/fail2ban/jail.d/kanboard.conf' wasn't deleted because it doesn't exist.
Info : '/etc/fail2ban/filter.d/kanboard.conf' wasn't deleted because it doesn't exist.
Attention : The user kanboard was not found
Info : [#################++.] > Removing the dedicated system user...
Info : [####################] > Removal of kanboard completed
Erreur : L’opération 'Installer l’application 'kanboard'' a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en utilisant la commande 'yunohost log display 20200605-145945-app_install-kanboard --share'

Marf ben tu me fais pas perdre mon temps, si tu as ce soucis d’autres peuvent / vont l’avoir et il faut le réparer, c’est juste que c’est un peu frustrant entre les bugs dans apt, les bugs dans le package de l’app, et sury qui rajoute une couche de complexité c’est relou de pas pouvoir juste installer trois dépendances PHP tranquillement …

Est-ce que tu peux regarder

apt policy php-mbstring

(chez moi j’ai bien un installation candidate :confused: )

Moi j’ai ça:

php-mbstring:
  Installé : 2:7.4+76+0~20200511.26+debian9~1.gbpc9beb6
  Candidat : (aucun)
 Table de version :
 *** 2:7.4+76+0~20200511.26+debian9~1.gbpc9beb6 -1
         50 https://packages.sury.org/php stretch/main amd64 Packages
        100 /var/lib/dpkg/status
     1:7.0+49 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages