sudo apt-get install composer - failer

Asked by Holbok István

The system is Ubuntu Jammy Jellyfish (development branch) for 64bit
Gnome version: 42.beta

The original message when run the command sudo apt-get install composer in the terminal

Csomaglisták olvasása... Kész
Függőségi fa építése... Kész
Állapotinformációk olvasása... Kész
Néhány csomagot nem lehetett telepíteni. Ez azt jelentheti, hogy egy lehetetlen állapotot kért, vagy ha az unstable disztribúciót
használja, akkor néhány igényelt csomag még nem készült el vagy ki lett mozdítva az Incoming-ból.
Az alábbi információk segíthetnek megoldani a problémát:

Az alábbi csomagoknak teljesítetlen függőségei vannak:
 php-symfony-console : Töri: php-psr-log (>= 3) de csak 3.0.0-1 telepíthető
E: A problémák nem javíthatók, sérült csomagokat fogott vissza.

-------------

Reading package lists... Finished
Building a tree of dependence... Finished
Read status information... Ready
Some packages could not be installed. This could mean that an impossible state was requested or if the unstable distribution
some of the requested packages have not been completed or have been moved out of Incoming.
The following information may help you to solve the problem:

The following packages have unfulfilled pending requests:
 php-symfony-console : Breaks: php-psr-log (>= 3) but only 3.0.0-1 can be installed
E: Problems cannot be fixed, corrupted packages are trapped.

How can I handle this issue in the development version of Ubuntu Jammy Jellyfish (2022.04 LTS)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

For diagnostic purposes please provide the output that you receive for the commands

uname -a
lsb_release -crid
LANG=C sudo dpkg --audit
LANG=C apt-cache policy composer php-symfony-console php-psr-log
LANG=C apt --simulate install composer php-psr-log=1.1.4-2

Revision history for this message
Holbok István (holbi88) said :
#2

Thank you Manfred the help. Here is the output of these commands:

$ uname -a
Linux <machine-name> 5.15.0-22-generic #22-Ubuntu SMP Tue Feb 8 10:16:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu Jammy Jellyfish (development branch)
Release: 22.04
Codename: jammy

$ LANG=C sudo dpkg --audit
The following packages are missing the list control file in the database, they need to be reinstalled:
 python fake package for OKI MFP scan driver

The following packages are missing the md5sums control file in the database, they need to be reinstalled:
 python fake package for OKI MFP scan driver

$ LANG=C apt-cache policy composer php-symfony-console php-psr-log
composer:
  Installed: (none)
  Candidate: 2.2.6-2ubuntu1
  Version table:
     2.2.6-2ubuntu1 500
        500 http://hu.archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 Packages
        500 http://hu.archive.ubuntu.com/ubuntu jammy-proposed/universe i386 Packages
     2.1.12-1ubuntu1 500
        500 http://hu.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        500 http://hu.archive.ubuntu.com/ubuntu jammy/universe i386 Packages
php-symfony-console:
  Installed: (none)
  Candidate: 5.4.4+dfsg-1ubuntu1
  Version table:
     5.4.4+dfsg-1ubuntu1 500
        500 http://hu.archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 Packages
        500 http://hu.archive.ubuntu.com/ubuntu jammy-proposed/universe i386 Packages
     5.2.6+dfsg-1ubuntu7 500
        500 http://hu.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        500 http://hu.archive.ubuntu.com/ubuntu jammy/universe i386 Packages
php-psr-log:
  Installed: 3.0.0-1
  Candidate: 3.0.0-1
  Version table:
 *** 3.0.0-1 500
        500 http://hu.archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 Packages
        500 http://hu.archive.ubuntu.com/ubuntu jammy-proposed/universe i386 Packages
        100 /var/lib/dpkg/status
     1.1.4-2 500
        500 http://hu.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        500 http://hu.archive.ubuntu.com/ubuntu jammy/universe i386 Packages

$ LANG=C apt --simulate install composer php-psr-log=1.1.4-2
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  git git-man jsonlint liberror-perl php-composer-ca-bundle
  php-composer-metadata-minifier php-composer-pcre php-composer-semver
  php-composer-spdx-licenses php-composer-xdebug-handler php-intl
  php-json-schema php-psr-container php-react-promise php-symfony-console
  php-symfony-deprecation-contracts php-symfony-filesystem php-symfony-finder
  php-symfony-polyfill-php80 php-symfony-process php-symfony-service-contracts
  php-symfony-string php8.1-intl
Suggested packages:
  fossil mercurial subversion git-daemon-run | git-daemon-sysvinit git-doc
  git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn
  php-symfony-event-dispatcher php-symfony-lock
  php-symfony-service-implementation
The following NEW packages will be installed:
  composer git git-man jsonlint liberror-perl php-composer-ca-bundle
  php-composer-metadata-minifier php-composer-pcre php-composer-semver
  php-composer-spdx-licenses php-composer-xdebug-handler php-intl
  php-json-schema php-psr-container php-react-promise php-symfony-console
  php-symfony-deprecation-contracts php-symfony-filesystem php-symfony-finder
  php-symfony-polyfill-php80 php-symfony-process php-symfony-service-contracts
  php-symfony-string php8.1-intl
The following packages will be DOWNGRADED:
  php-psr-log
0 upgraded, 24 newly installed, 1 downgraded, 0 to remove and 3 not upgraded.
Inst php-composer-ca-bundle (1.3.1-1 Ubuntu:22.04/jammy [all])
Inst php-composer-metadata-minifier (1.0.0-2 Ubuntu:22.04/jammy [all])
Inst php-composer-semver (3.2.9-1 Ubuntu:22.04/jammy [all])
Inst php-composer-spdx-licenses (1.5.6-1 Ubuntu:22.04/jammy [all])
Inst php-psr-log [3.0.0-1] (1.1.4-2 Ubuntu:22.04/jammy [all])
Inst php-composer-pcre (1.0.1-1 Ubuntu:22.04/jammy [all])
Inst php-composer-xdebug-handler (2.0.4-1 Ubuntu:22.04/jammy [all])
Inst php-json-schema (5.2.11-1 Ubuntu:22.04/jammy [all])
Inst jsonlint (1.8.3-2 Ubuntu:22.04/jammy [all])
Inst php-symfony-deprecation-contracts (2.4.0-1ubuntu2 Ubuntu:22.04/jammy [all])
Inst php-symfony-polyfill-php80 (1.24.0-1ubuntu1 Ubuntu:22.04/jammy [all])
Inst php-psr-container (2.0.2-1 Ubuntu:22.04/jammy [all])
Inst php-symfony-service-contracts (2.4.0-1ubuntu2 Ubuntu:22.04/jammy [all])
Inst php8.1-intl (8.1.2-1build1 Ubuntu:22.04/jammy-proposed [amd64])
Inst php-intl (2:8.1+92ubuntu1 Ubuntu:22.04/jammy [all])
Inst php-symfony-string (5.4.4+dfsg-1ubuntu1 Ubuntu:22.04/jammy-proposed [all])
Inst php-symfony-console (5.4.4+dfsg-1ubuntu1 Ubuntu:22.04/jammy-proposed [all])
Inst php-symfony-filesystem (5.4.4+dfsg-1ubuntu1 Ubuntu:22.04/jammy-proposed [all])
Inst php-symfony-finder (5.4.4+dfsg-1ubuntu1 Ubuntu:22.04/jammy-proposed [all])
Inst php-symfony-process (5.4.4+dfsg-1ubuntu1 Ubuntu:22.04/jammy-proposed [all])
Inst php-react-promise (2.7.0-2 Ubuntu:22.04/jammy [all])
Inst composer (2.2.6-2ubuntu1 Ubuntu:22.04/jammy-proposed [all])
Inst liberror-perl (0.17029-1 Ubuntu:22.04/jammy [all])
Inst git-man (1:2.34.1-1ubuntu1 Ubuntu:22.04/jammy [all])
Inst git (1:2.34.1-1ubuntu1 Ubuntu:22.04/jammy [amd64])
Conf php-composer-ca-bundle (1.3.1-1 Ubuntu:22.04/jammy [all])
Conf php-composer-metadata-minifier (1.0.0-2 Ubuntu:22.04/jammy [all])
Conf php-composer-semver (3.2.9-1 Ubuntu:22.04/jammy [all])
Conf php-composer-spdx-licenses (1.5.6-1 Ubuntu:22.04/jammy [all])
Conf php-psr-log (1.1.4-2 Ubuntu:22.04/jammy [all])
Conf php-composer-pcre (1.0.1-1 Ubuntu:22.04/jammy [all])
Conf php-composer-xdebug-handler (2.0.4-1 Ubuntu:22.04/jammy [all])
Conf php-json-schema (5.2.11-1 Ubuntu:22.04/jammy [all])
Conf jsonlint (1.8.3-2 Ubuntu:22.04/jammy [all])
Conf php-symfony-deprecation-contracts (2.4.0-1ubuntu2 Ubuntu:22.04/jammy [all])
Conf php-symfony-polyfill-php80 (1.24.0-1ubuntu1 Ubuntu:22.04/jammy [all])
Conf php-psr-container (2.0.2-1 Ubuntu:22.04/jammy [all])
Conf php-symfony-service-contracts (2.4.0-1ubuntu2 Ubuntu:22.04/jammy [all])
Conf php8.1-intl (8.1.2-1build1 Ubuntu:22.04/jammy-proposed [amd64])
Conf php-intl (2:8.1+92ubuntu1 Ubuntu:22.04/jammy [all])
Conf php-symfony-string (5.4.4+dfsg-1ubuntu1 Ubuntu:22.04/jammy-proposed [all])
Conf php-symfony-console (5.4.4+dfsg-1ubuntu1 Ubuntu:22.04/jammy-proposed [all])
Conf php-symfony-filesystem (5.4.4+dfsg-1ubuntu1 Ubuntu:22.04/jammy-proposed [all])
Conf php-symfony-finder (5.4.4+dfsg-1ubuntu1 Ubuntu:22.04/jammy-proposed [all])
Conf php-symfony-process (5.4.4+dfsg-1ubuntu1 Ubuntu:22.04/jammy-proposed [all])
Conf php-react-promise (2.7.0-2 Ubuntu:22.04/jammy [all])
Conf composer (2.2.6-2ubuntu1 Ubuntu:22.04/jammy-proposed [all])
Conf liberror-perl (0.17029-1 Ubuntu:22.04/jammy [all])
Conf git-man (1:2.34.1-1ubuntu1 Ubuntu:22.04/jammy [all])
Conf git (1:2.34.1-1ubuntu1 Ubuntu:22.04/jammy [amd64])

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#3

At the moment jammy is in heavy development, and especially in jammy-proposed there may be broken packages or broken dependencies. You should not use the -proposed repository in the development release unless you know how to cope with dependency problems.

For installing composer try

sudo apt install composer php-psr-log=1.1.4-2

This will - at least for the moment - downgrade php-psr-log from the version in "jammy-proposed" to the version in the "jammy" repository.

Revision history for this message
Holbok István (holbi88) said :
#4

Thank you Manfred.
The proposed solution first failed on the php-intl dependency.

After this I turned out using jammy-proposed repository, removed all installed PHP libraries, cleared cache, and from this basis started again.

Now the composer installed properly, and the PHP also.
Thanks again.