-1

I tried to install phpmyadmin on ubuntu 20.10, but there are errors :

$ sudo apt install phpmyadmin
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 : php-phpmyadmin-sql-parser : Dépend: php-mbstring php-twig : Dépend: php-mbstring phpmyadmin : Dépend: php-mbstring Recommande: php-bz2 Recommande: php-zip E: Impossible de corriger les problèmes, des paquets défectueux sont en mode « garder en l'état ».

if I tried :

$ sudo apt install php-mbstring
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.4-mbstring : Dépend: php7.4-common (= 7.4.3-4ubuntu2.4) mais 7.4.9-1ubuntu1 devra être installé E: Impossible de corriger les problèmes, des paquets défectueux sont en mode « garder en l'état ».

I tried purge all php-* package and reinstall php7.4.

aptitude don't resolve problem apt -f install too...

EDIT :

$ php --version
PHP 7.4.9 (cli) (built: Aug 21 2020 23:31:19) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.9, Copyright (c), by Zend Technologies

$ apt-cache policy php7.4-mbstring phpmyadmin php7.4-common php7.4-mbstring: Installé : (aucun) Candidat : 7.4.3-4ubuntu2.4 Table de version : 7.4.3-4ubuntu2.4 500 500 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages 500 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages 7.4.3-4ubuntu1 500 500 http://fr.archive.ubuntu.com/ubuntu focal/universe amd64 Packages phpmyadmin: Installé : (aucun) Candidat : 4:4.9.5+dfsg1-2 Table de version : 4:4.9.5+dfsg1-2 500 500 http://fr.archive.ubuntu.com/ubuntu focal/universe amd64 Packages 500 http://fr.archive.ubuntu.com/ubuntu focal/universe i386 Packages php7.4-common: Installé : 7.4.9-1ubuntu1 Candidat : 7.4.9-1ubuntu1 Table de version : *** 7.4.9-1ubuntu1 500 500 http://archive.ubuntu.com/ubuntu groovy/main amd64 Packages 100 /var/lib/dpkg/status 7.4.3-4ubuntu2.4 500 500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages 500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages 7.4.3-4ubuntu1 500 500 http://fr.archive.ubuntu.com/ubuntu focal/main amd64 Packages 500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages

Matrix
  • 129
  • 1
    It looks like there are multiple repositories that contain the PHP packages and the wrong ones are being chosen. You may need to clearly state which version of PHP to install on your system. What is the output of php --version? – matigo Jun 02 '21 at 00:04
  • 1
    Can you add apt-cache policy php7.4-mbstring phpmyadmin php7.4-common to your question and make sure groovy-security is enabled. – nobody Jun 02 '21 at 13:50
  • @matigo edit done, any idea ? – Matrix Jun 08 '21 at 16:39
  • @nobody edit done, any idea ? – Matrix Jun 08 '21 at 16:39
  • great a mix between focal and groovy sources. Please restore your sources https://askubuntu.com/questions/124017/how-do-i-restore-the-default-repositories according to the output lsb_release -rd and save for security your data. – nobody Jun 08 '21 at 17:18
  • Seems some packages are marked as held. What does apt-mark showhold give? – mook765 Jun 08 '21 at 20:03

2 Answers2

0

I ran into a similar issue while installing php7.4-pgsql which i wanted to install on ubuntu 20.04 while the rest of the php7.4 modules were installed on ubuntu 18.04.

$ sudo apt install php7.4-pgsql
The following packages contain unfulfilled dependencies
php7.4-pgsql : depends: php7.4-common (= 7.4.3-4ubuntu2.4) but 7.4.18-2 + ubuntu18.04.1 + deb.sury.org + 1 must be installed 
E: Unable to correct problems, defective packages are in "keep as is" mode.

I didn't know how to interpret this error message ... I was showing the list of php-7.4 packages:

$ sudo dpkg --list | grep php7.4
ii  php7.4                                                      7.4.18-2+ubuntu18.04.1+deb.sury.org+1                              all          server-side, HTML-embedded scripting language (metapackage)
ii  php7.4-cli                                                  7.4.18-2+ubuntu18.04.1+deb.sury.org+1                              amd64        command-line interpreter for the PHP scripting language
ii  php7.4-common                                               7.4.18-2+ubuntu18.04.1+deb.sury.org+1                              amd64        documentation, examples and common module for PHP
ii  php7.4-curl                                                 7.4.18-2+ubuntu18.04.1+deb.sury.org+1                              amd64        CURL module for PHP
ii  php7.4-gd                                                   7.4.18-2+ubuntu18.04.1+deb.sury.org+1                              amd64        GD module for PHP
ii  php7.4-mysql                                                7.4.18-2+ubuntu18.04.1+deb.sury.org+1                              amd64        MySQL module for PHP
ii  php7.4-json                                                 7.4.18-2+ubuntu18.04.1+deb.sury.org+1                              amd64        JSON module for PHP
ii  php7.4-opcache                                              7.4.18-2+ubuntu18.04.1+deb.sury.org+1                              amd64        Zend OpCache module for PHP
ii  php7.4-readline                                             7.4.18-2+ubuntu18.04.1+deb.sury.org+1                              amd64        readline module for PHP
ii  php7.4-xml                                                  7.4.18-2+ubuntu18.04.1+deb.sury.org+1                              amd64        DOM, SimpleXML, XML, and XSL module for PHP

there was obviously a conflict in the sources, the old packages coming from 7.4.18-2 + ubuntu18.04.1 + deb.sury.org + 1 while the new one was provided by 7.4.3-4ubuntu2.4...

so i decided to remove all php7.4- * modules:

$ sudo apt remove --purge php7.4 php7.4-cli php7.4-common php7.4-curl php7.4-gd php7.4-json php7.4-mysql php7.4-opcache php7.4-readline php7.4-xml

to reinstall them afterwards:

$ sudo sudo apt install php7.4 php7.4-cli php7.4-common php7.4-curl php7.4-gd php7.4-json php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-readline php7.4-xml -y

Instead of coming from source 7.4.18-2 + ubuntu18.04.1 + deb.sury.org + 1, new packages come from 7.4.3-4ubuntu2.4:

$ sudo dpkg --list | grep php7.4
ii  php7.4                                                      7.4.3-4ubuntu2.4                                                   all          server-side, HTML-embedded scripting language (metapackage)
ii  php7.4-cli                                                  7.4.3-4ubuntu2.4                                                   amd64        command-line interpreter for the PHP scripting language
ii  php7.4-common                                               7.4.3-4ubuntu2.4                                                   amd64        documentation, examples and common module for PHP
ii  php7.4-curl                                                 7.4.3-4ubuntu2.4                                                   amd64        CURL module for PHP
ii  php7.4-gd                                                   7.4.3-4ubuntu2.4                                                   amd64        GD module for PHP
ii  php7.4-json                                                 7.4.3-4ubuntu2.4                                                   amd64        JSON module for PHP
ii  php7.4-mysql                                                7.4.3-4ubuntu2.4                                                   amd64        MySQL module for PHP
ii  php7.4-opcache                                              7.4.3-4ubuntu2.4                                                   amd64        Zend OpCache module for PHP
ii  php7.4-readline                                             7.4.3-4ubuntu2.4                                                   amd64        readline module for PHP
ii  php7.4-xml                                                  7.4.3-4ubuntu2.4                                                   amd64        DOM, SimpleXML, XML, and XSL module for PHP

the php7.4-pgsql package finally installed correctly

sudo apt install php7.4-pgsql
sudo dpkg --list | grep php7.4-pgsql
ii  php7.4-pgsql
0

I upgrade Ubuntu version, it solve my problem

Matrix
  • 129