Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Installation: Error: It is not possible to switch enabled streams of a module

Tags:

php

centos8

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?

like image 954
Luis Alfredo Serrano Díaz Avatar asked Dec 02 '22 09:12

Luis Alfredo Serrano Díaz


1 Answers

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
like image 78
Remi Collet Avatar answered Feb 09 '23 01:02

Remi Collet