Topic: Composer package update. CentOS 8

Hello

Unable to install updates. Here is already a closed thread about composer, but I did not understood what is the solution. My case's output is

[root@ispcd ~]# dnf update
Last metadata expiration check: 2:49:37 ago on Tue 10 Nov 2020 07:00:39 PM EET.
Error:
Problem: cannot install the best update candidate for package composer-1.10.15-1.el8.remi.noarch
  - nothing provides (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4) needed by composer-2.0.6-1.el8.remi.noarch
  - nothing provides (php-composer(react/promise) >= 2.7 with php-composer(react/promise) < 3) needed by composer-2.0.6-1.el8.remi.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Re: Composer package update. CentOS 8

You need  to  enable  "remi" repository

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Composer package update. CentOS 8

Remi wrote:

You need  to  enable  "remi" repository

It helps. Thanks.

Re: Composer package update. CentOS 8

Previous answer (from phone) was short, explanation

Usually "noarch" packages are in EPEL, and "remi" provides more recent versions
So, as it replaces official packages it is not enabled by default

But, for 8, things are a bit different as EPEL-8 is empty for now (no PHP packages there)
or perhaps is dead....

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Composer package update. CentOS 8

Hi Remi!

Sorry to necro an older post, but I think I'm having a similar issue and I'm curious about your response.

Remi wrote:

You need  to  enable  "remi" repository

I believe I have done this by installing remi-release.noarch rpm. However, I'm having a similar issue. I'm using CentOS 8 (not Stream) and php:remi-8.0. We plan on moving to Rocky Linux when that is stable. You mentioned:

Remi wrote:

But, for 8, things are a bit different as EPEL-8 is empty for now (no PHP packages there)
or perhaps is dead....

Does this mean that due to CentOS 8 being killed some of the dependencies are now missing that makes composer work?

Here is my environment and issue:

root@King-Cobra1 ~]# dnf list *epel*
Last metadata expiration check: 0:20:32 ago on Wed 05 May 2021 03:35:47 PM UTC.
Installed Packages
epel-release.noarch                                                               8-10.el8                                                            @epel
Available Packages
epel-rpm-macros.noarch                                                            8-19                                                                epel 

[root@King-Cobra1 ~]# dnf list *remi*
Last metadata expiration check: 0:20:38 ago on Wed 05 May 2021 03:35:47 PM UTC.
Installed Packages
remi-release.noarch                   

[root@King-Cobra1 ~]# dnf module list
Last metadata expiration check: 0:08:01 ago on Wed 05 May 2021 03:35:47 PM UTC.
CentOS Linux 8 - AppStream
Name                 Stream           Profiles Summary                                                                                                     
389-ds               1.4                       389 Directory Server (base)                                                                                 
ant                  1.10 [d]         common [ Java build tool                                                                                             
                                      d]       
container-tools      rhel8 [d]        common [ Most recent (rolling) versions of podman, buildah, skopeo, runc, conmon, runc, conmon, CRIU, Udica, etc as w
                                      d]       ell as dependencies such as container-selinux built and tested together, and updated as frequently as every 
                                               12 weeks.
container-tools      1.0              common [ Stable versions of podman 1.0, buildah 1.5, skopeo 0.1, runc, conmon, CRIU, Udica, etc as well as dependenci
                                      d]       es such as container-selinux built and tested together, and supported for 24 months.
container-tools      2.0              common [ Stable versions of podman 1.6, buildah 1.11, skopeo 0.1, runc, conmon, etc as well as dependencies such as c
                                      d]       ontainer-selinux built and tested together, and supported as documented on the Application Stream lifecycle 
                                               page.
freeradius           3.0 [d]          server [ High-performance and highly configurable free RADIUS server                                                 
                                      d]       
gimp                 2.8 [d]          common [ gimp module                                                                                                 
                                      d], deve 
                                      l        
go-toolset           rhel8 [d]        common [ Go                                                                                                          
                                      d]       
httpd                2.4 [d][e]       common [ Apache HTTP Server                                                                                          
                                      d], deve 
                                      l, minim 
                                      al       
idm                  DL1              adtrust, The Red Hat Enterprise Linux Identity Management system module                                              
                                       client, 
                                       common  
                                      [d], dns 
                                      , server 
idm                  client [d]       common [ RHEL IdM long term support client module                                                                    
                                      d]       
inkscape             0.92.3 [d]       common [ Vector-based drawing program using SVG                                                                      
                                      d]       
javapackages-runtime 201801 [d][e]    common [ Basic runtime utilities to support Java applications                                                        
                                      d]       
jmc                  rhel8 [d]        common [ Java Mission Control is a profiling and diagnostics tool for the Hotspot JVM                                
                                      d], core 
libselinux-python    2.8              common   Python 2 bindings for libselinux                                                                            
llvm-toolset         rhel8 [d]        common [ LLVM                                                                                                        
                                      d]       
mailman              2.1 [d]          common [ Electronic mail discussion and e-newsletter lists managing software                                         
                                      d]       
mariadb              10.3 [d]         client,  MariaDB Module                                                                                              
                                      galera,  
                                      server [ 
                                      d]       
maven                3.5 [d]          common [ Java project management and project comprehension tool                                                      
                                      d]       
maven                3.6              common [ Java project management and project comprehension tool                                                      
                                      d]       
mercurial            4.8 [d]          common [ Mercurial -- a distributed SCM                                                                              
                                      d]       
mod_auth_openidc     2.3                       Apache module suporting OpenID Connect authentication                                                       
mysql                8.0 [d]          client,  MySQL Module                                                                                                
                                      server [ 
                                      d]       
nginx                1.14 [d]         common [ nginx webserver                                                                                             
                                      d]       
nginx                1.16             common [ nginx webserver                                                                                             
                                      d]       
nginx                1.18 [e]         common [ nginx webserver                                                                                             
                                      d] [i]   
nodejs               10 [d]           common [ Javascript runtime                                                                                          
                                      d], deve 
                                      lopment, 
                                       minimal 
                                      , s2i    
nodejs               12               common [ Javascript runtime                                                                                          
                                      d], deve 
                                      lopment, 
                                       minimal 
                                      , s2i    
nodejs               14 [e]           common [ Javascript runtime                                                                                          
                                      d] [i],  
                                      developm 
                                      ent, min 
                                      imal, s2 
                                      i        
parfait              0.5              common   Parfait Module                                                                                              
perl                 5.24             common [ Practical Extraction and Report Language                                                                    
                                      d], mini 
                                      mal      
perl                 5.26 [d][e]      common [ Practical Extraction and Report Language                                                                    
                                      d], mini 
                                      mal      
perl                 5.30             common [ Practical Extraction and Report Language                                                                    
                                      d], mini 
                                      mal      
perl-App-cpanminus   1.7044 [d]       common [ Get, unpack, build and install CPAN modules                                                                 
                                      d]       
perl-DBD-MySQL       4.046 [d]        common [ A MySQL interface for Perl                                                                                  
                                      d]       
perl-DBD-Pg          3.7 [d]          common [ A PostgreSQL interface for Perl                                                                             
                                      d]       
perl-DBD-SQLite      1.58 [d]         common [ SQLite DBI driver                                                                                           
                                      d]       
perl-DBI             1.641 [d]        common [ A database access API for Perl                                                                              
                                      d]       
perl-FCGI            0.78 [d]         common [ FastCGI Perl bindings                                                                                       
                                      d]       
perl-IO-Socket-SSL   2.066 [d][e]     common [ Perl library for transparent TLS                                                                            
                                      d]       
perl-YAML            1.24 [d]         common [ Perl parser for YAML                                                                                        
                                      d]       
perl-libwww-perl     6.34 [d][e]      common [ A Perl interface to the World-Wide Web                                                                      
                                      d]       
php                  7.2 [d]          common [ PHP scripting language                                                                                      
                                      d], deve 
                                      l, minim 
                                      al       
php                  7.3              common [ PHP scripting language                                                                                      
                                      d], deve 
                                      l, minim 
                                      al       
php                  7.4              common [ PHP scripting language                                                                                      
                                      d], deve 
                                      l, minim 
                                      al       
pki-core             10.6                      PKI Core module for PKI 10.6 or later                                                                       
pki-deps             10.6                      PKI Dependencies module for PKI 10.6 or later                                                               
postgresql           9.6              client,  PostgreSQL server and client module                                                                         
                                      server [ 
                                      d]       
postgresql           10 [d]           client,  PostgreSQL server and client module                                                                         
                                      server [ 
                                      d]       
postgresql           12               client,  PostgreSQL server and client module                                                                         
                                      server [ 
                                      d]       
python27             2.7 [d]          common [ Python programming language, version 2.7                                                                    
                                      d]       
python36             3.6 [d]          build, c Python programming language, version 3.6                                                                    
                                      ommon [d 
                                      ]        
python38             3.8 [d]          build, c Python programming language, version 3.8                                                                    
                                      ommon [d 
                                      ]        
redis                5 [d]            common [ Redis persistent key-value database                                                                         
                                      d]       
rhn-tools            1.0 [d]          common [ Red Hat Satellite 5 tools for RHEL                                                                          
                                      d]       
ruby                 2.5 [d]          common [ An interpreter of object-oriented scripting language                                                        
                                      d]       
ruby                 2.6              common [ An interpreter of object-oriented scripting language                                                        
                                      d]       
ruby                 2.7              common [ An interpreter of object-oriented scripting language                                                        
                                      d]       
rust-toolset         rhel8 [d]        common [ Rust                                                                                                        
                                      d]       
satellite-5-client   1.0 [d]          common [ Red Hat Satellite 5 client packages                                                                         
                                      d], gui  
scala                2.10 [d]         common [ A hybrid functional/object-oriented language for the JVM                                                    
                                      d]       
squid                4 [d]            common [ Squid - Optimising Web Delivery                                                                             
                                      d]       
subversion           1.10 [d]         common [ Apache Subversion                                                                                           
                                      d], serv 
                                      er       
swig                 3.0 [d]          common [ Connects C/C++/Objective C to some high-level programming languages                                         
                                      d], comp 
                                      lete     
varnish              6 [d]            common [ Varnish HTTP cache                                                                                          
                                      d]       
virt                 rhel [d]         common [ Virtualization module                                                                                       
                                      d]       

Extra Packages for Enterprise Linux Modular 8 - x86_64
Name                 Stream           Profiles Summary                                                                                                     
389-directory-server next             default, 389 Directory Server                                                                                        
                                       minimal 
389-directory-server stable           default  389 Directory Server                                                                                        
                                      [d], leg 
                                      acy, min 
                                      imal     
389-directory-server testing          default  389 Directory Server                                                                                        
                                      [d], leg 
                                      acy, min 
                                      imal     
avocado              latest           default, Framework with tools and libraries for Automated Testing                                                    
                                       minimal 
avocado              82lts            default, Framework with tools and libraries for Automated Testing                                                    
                                       minimal 
cobbler              3                default  Versatile Linux deployment server                                                                           
                                      [d]      
dwm                  latest           default, Dynamic window manager for X                                                                                
                                       user    
libuv                epel8-buildroot  devel [d libuv-devel for EPEL 8                                                                                      
                                      ]        
nextcloud            nextcloud-stable default, A private file sync and share server - Stable branch                                                        
                                       testing 
nextcloud            nextcloud-18     default, A private file sync and share server - version 18.0.x                                                       
                                       testing 
nextcloud            nextcloud-19     default, A private file sync and share server - version 19.0.x                                                       
                                       testing 
nextcloud            nextcloud-20     default, A private file sync and share server - version 20.0.x                                                       
                                       testing 
nginx                mainline         common   nginx webserver                                                                                             
nodejs               13               default, Javascript runtime                                                                                          
                                       develop 
                                      ment, mi 
                                      nimal    
swig                 4.0              complete Connects C/C++/Objective C to some high-level programming languages                                         
                                      , defaul 
                                      t        
zabbix               5.0              agent, p Open-source monitoring solution for your IT infrastructure                                                  
                                      roxy, se 
                                      rver     

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name                 Stream           Profiles Summary                                                                                                     
composer             1                common [ Dependency Manager for PHP                                                                                  
                                      d]       
composer             2 [d]            common [ Dependency Manager for PHP                                                                                  
                                      d]       
glpi                 9.3              common [ Free IT asset management software                                                                           
                                      d]       
glpi                 9.4 [d]          common [ Free IT asset management software                                                                           
                                      d]       
php                  remi-7.2         common [ PHP scripting language                                                                                      
                                      d], deve 
                                      l, minim 
                                      al       
php                  remi-7.3         common [ PHP scripting language                                                                                      
                                      d], deve 
                                      l, minim 
                                      al       
php                  remi-7.4         common [ PHP scripting language                                                                                      
                                      d], deve 
                                      l, minim 
                                      al       
php                  remi-8.0 [e]     common [ PHP scripting language                                                                                      
                                      d] [i],  
                                      devel, m 
                                      inimal   
redis                remi-5.0         common [ Redis persistent key-value database                                                                         
                                      d]       
redis                remi-6.0         common [ Redis persistent key-value database                                                                         
                                      d]       
redis                remi-6.2 [e]     common [ Redis persistent key-value database                                                                         
                                      d] [i]   

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

And when I try to enable composer:2:

[root@King-Cobra1 ~]# dnf module install composer:2
Last metadata expiration check: 2:10:28 ago on Wed 05 May 2021 03:35:47 PM UTC.
Error: 
 Problem: cannot install the best candidate for the job
  - nothing provides (php-composer(composer/ca-bundle) >= 1.0 with php-composer(composer/ca-bundle) < 2) needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides (php-composer(composer/spdx-licenses) >= 1.2 with php-composer(composer/spdx-licenses) < 2) needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides (php-composer(composer/xdebug-handler) >= 1.1 with php-composer(composer/xdebug-handler) < 2) needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides (php-composer(justinrainbow/json-schema) >= 5.2.10 with php-composer(justinrainbow/json-schema) < 6) needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2) needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides (php-composer(seld/jsonlint) >= 1.4 with php-composer(seld/jsonlint) < 2) needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides (php-composer(seld/phar-utils) >= 1.0 with php-composer(seld/phar-utils) < 2) needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4) needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides (php-composer(react/promise) >= 2.7 with php-composer(react/promise) < 3) needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides php-PsrLog >= 1.1 needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides php-seld-phar-utils >= 1.1 needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides php-symfony4-console >= 4.4 needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides php-symfony4-filesystem >= 4.4 needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides php-symfony4-finder >= 4.4 needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides php-symfony4-process >= 4.4 needed by composer-2.0.13-1.el8.remi.noarch
  - nothing provides (php-composer(composer/metadata-minifier) >= 1.0 with php-composer(composer/metadata-minifier) < 2) needed by composer-2.0.13-1.el8.remi.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

I'm also curious if you have any thoughts on remirepo's compatibility with Rocky Linux in the future. I think it should work out of the box since it's basically picking up where CentOS 8 is leaving off.

Merci!

Re: Composer package update. CentOS 8

>>    You need  to  enable  "remi" repository
> I believe I have done this by installing remi-release.noarch rpm.

This is not enough, as "remi" repository (which provide noarch package) replace some packages from official repository, it is not enabled by default (on remi-safe is)


> Does this mean that due to CentOS 8 being killed some of the dependencies are now missing that makes composer work?

CentOS 8 is not killed
EPEL-8 is the problem

> I'm also curious if you have any thoughts on remirepo's compatibility with Rocky Linux in the future. I think it should work out of the box since it's basically picking up where CentOS 8 is leaving off.

I'm terribly disappointed by FUD around CentOS 8 stream

BTW, my main target is RHEL.
Clones work because they are clones.

Support for other distribution is a best effort (such as Amzn)

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Composer package update. CentOS 8

Got it! I was able to enable it with

dnf config-manager --set-enabled remi

And then enable the composer:2 module.

Thank You!

Re: Composer package update. CentOS 8

smile

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi