1 (edited by Sysadmin 2019-09-27 10:44:07)

Topic: Problems with REMI on CentOS8

Hi,

I have just loaded up CentOS8 to test it out.  I have a lot of CentOS 7 VMs maintained by Ansible.
I use REMI repos to get the latest PHP versions.

On CentOS7 I used to do this:

Install remi repo
Enable remi-php73 repo
yum install php (and a whole load of other php modules)

And I'd get the 7.3 versions of those.

That fails on CentOS8 because yum (/dnf) finds php 7.2 from the new Appstream and nothing else.

The only way I can install php 7.3 from remi is to specify it explicitly with: yum install php73-php

My question is this:  Is that how we have to do things in the brave new world of CentOS8 or is there something else I need to do to get yum/dnf to take notice of the remi-php73 repo?

I have included a comparison below of CentOS7 and CentOS8 using php-gd as an example:

CentOS7

[root@dcentos7 yum.repos.d]# yum repolist
repo id                                 repo name                                                          status
base/7/x86_64                           CentOS-7 - Base                                                    10,097
epel/x86_64                             Extra Packages for Enterprise Linux 7 - x86_64                     13,415
extras/7/x86_64                         CentOS-7 - Extras                                                  304
remi                                    Remi's RPM repository for Enterprise Linux 7 - x86_64              5,870
remi-php73                              Remi's PHP 7.3 RPM repository for Enterprise Linux 7 - x86_64      327
updates/7/x86_64                        CentOS-7 - Updates                                                 319

[root@centos7 yum.repos.d]# yum list | grep php-gd
php-gd.x86_64                              7.3.9-1.el7.remi           @remi-php73
php-gd.x86_64                              7.3.10-1.el7.remi          remi-php73
php54-php-gd.x86_64                        5.4.45-17.el7.remi         remi
php55-php-gd.x86_64                        5.5.38-11.el7.remi         remi
php56-php-gd.x86_64                        5.6.40-13.el7.remi         remi
php70-php-gd.x86_64                        7.0.33-13.el7.remi         remi
php71-php-gd.x86_64                        7.1.32-1.el7.remi          remi
php72-php-gd.x86_64                        7.2.23-1.el7.remi          remi
php73-php-gd.x86_64                        7.3.10-1.el7.remi          remi
php74-php-gd.x86_64                        7.4.0~rc2-22.el7.remi      remi


CentOS8

[root@centos8 yum.repos.d]# yum repolist
repo id                     repo name                                                            status
AppStream                   CentOS-8 - AppStream                                                 4,928
BaseOS                      CentOS-8 - Base                                                      2,713
*epel                       Extra Packages for Enterprise Linux 8 - x86_64                       1,614
extras                      CentOS-8 - Extras                                                    3
remi                        Remi's RPM repository for Enterprise Linux 8 - x86_64                3,263
remi-php73                  Remi's PHP 7.3 RPM repository for Enterprise Linux 8 - x86_64        248

[root@centos8 yum.repos.d]# yum list | grep php-gd
php-gd.x86_64                                             7.2.11-1.module_el8.0.0+56+d1ca79aa                    AppStream
php56-php-gd.x86_64                                       5.6.40-13.el8.remi                                     remi
php70-php-gd.x86_64                                       7.0.33-13.el8.remi                                     remi
php71-php-gd.x86_64                                       7.1.32-1.el8.remi                                      remi
php72-php-gd.x86_64                                       7.2.23-1.el8.remi                                      remi
php73-php-gd.x86_64                                       7.3.10-1.el8.remi                                      remi
php74-php-gd.x86_64                                       7.4.0~rc2-22.el8.remi                                  remi

As you can see, CentOS7 gets php-gd from Remi but CentOS8 gets it from Appstream and it's the wrong version.

Re: Problems with REMI on CentOS8

With CentOS 8, PHP is distributed as a module (AppStream = repository of module)

See the Wizard: https://rpms.remirepo.net/wizard/
Also https://blog.remirepo.net/post/2019/09/ … repository
And https://blog.remirepo.net/post/2019/09/ … and-7.3.10


So if you want a single version

dnf module install php:remi-7.3

P.S. From  your repolist, remi-modular is missing

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: Problems with REMI on CentOS8

Thanks REMI - I see now that remi-modular was disabled and that was why the module install wasn't working and the wrong versions were showing in repolist.

So to answer my own question: No, I don't have to specify version numbers on all the php modules I want to install, but I do have to, as the Wizard states, "enable the module stream for 7.3:" and after that I can add other modules in the same way as before"

e.g.

yum install php-gd

Thanks again.

Re: Problems with REMI on CentOS8

smile

Yes

C7: enable the version specific repo

yum-config-manager --enable remi-php73

C8: enable the version specific module stream

dnf module enable php:remi-7.3

Then it work the same way

yum  install php-xxxx
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