php - PHP安装:错误:无法切换模块的启用流
问题描述
我尝试使用以下命令将 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.
我怎样才能解决这个问题?
解决方案
正如向导说明和粘贴的错误消息中所解释的,您需要先禁用旧版本流,然后才能启用新版本:
dnf module reset php
dnf module install php:remi-7.4
dnf update
推荐阅读
- azure-devops - 为什么我无法将存储库添加到 Azure DevOps 中的项目
- c++ - 使用 char* 读取和写入文件
- css - div中标题的CSS计数器重置太频繁
- apache-spark - Parquet 格式使用 pyspark 分别存储不良记录
- python - DRF post to model with a many-to-many field
- memory - 计算机内存缓存大小和性能
- excel - 大量的多页用户窗体,在初始化时导致 Excel 意外崩溃
- css - 如何将 1 个列卡移动到另一个列引导程序?
- ruby-on-rails - # 的未定义方法
我有这个内部
User
模型def self.home_opinions (user) home_opinions = user.opinions user.follows.find_each do |follow| home_opinions+=(follow.opinions) end
- spring - 将 MapsId 与非主键的引用列一起使用