【问题标题】:PHP Installation: Error: It is not possible to switch enabled streams of a modulePHP安装:错误:无法切换模块的启用流
【发布时间】:2020-11-14 16:48:35
【问题描述】:

我正在尝试使用以下命令将 php 从 7.2 升级到 centos 8 中的最新 7.4 版本:

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

但是当我启动这个命令时:dnf module enable php:remi-7.4 -y

我收到此错误:

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.

我该如何解决这个问题?

【问题讨论】:

  • 你可以投票,但php不是服务。

标签: php centos8


【解决方案1】:

正如wizard instructions 所述,以及粘贴的错误消息中所述,您需要先禁用旧版本流,然后才能启用新版本:

dnf module reset php
dnf module install php:remi-7.4
dnf update

【讨论】:

  • 是否可以安装多个版本,同时保持 7.2 作为默认系统版本?我正在使用 Virtualmin,因此希望有 7.3 和 7.4 可用,但也将 7.2 作为默认版本。有点像 CentOS 7 中的软件集合。
  • 是的,SCL 在我的存储库中仍然可用,请参阅向导说明
猜你喜欢
  • 2010-12-18
  • 2015-03-26
  • 1970-01-01
  • 1970-01-01
  • 2014-09-26
  • 1970-01-01
  • 2016-08-09
  • 1970-01-01
  • 2018-03-08
相关资源
最近更新 更多