10

Im trying to upgrade php from 7.2 to last 7.4 version in centos 8 with this commands:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm

dnf module list php

but when I launch this command: dnf module enable php:remi-7.4 -y

I receive this error:

Last metadata expiration check: 0:05:44 ago on Fri 24 Jul 2020 08:56:07 PM CEST.
Dependencies resolved.
The operation would result in switching of module 'php' stream '7.2' to stream 'remi-7.4'
Error: It is not possible to switch enabled streams of a module.
It is recommended to remove all installed content from the module, and reset the module using 'dnf module reset <module_name>' command. After you reset the module, you can install the other stream.

How can I fix this?

1 Answers1

34

As explained by the wizard instructions, and as explained in the pasted error message, you need to disable the old version stream before enabling the new one:

dnf module reset php
dnf module install php:remi-7.4
dnf update
Remi Collet
  • 6,198
  • 1
  • 20
  • 25
  • Is it possible to have multiple versions installed while keeping 7.2 as the default system version? I'm using Virtualmin so want to have 7.3 and 7.4 available but also keep 7.2 as the default version. Kind of like with software collections in CentOS 7. – Chris Wheeler Oct 14 '20 at 19:51
  • 1
    Yes, SCL are still available on my repository, see the Wizard instructions – Remi Collet Oct 15 '20 at 04:39