You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Oracle Linux 8.8无法从官方源安装Nginx 1.22.1求助

解决Oracle Linux 8.8安装nginx-1.22.1的问题

Oracle Linux 8的AppStream仓库采用**模块流(Module Stream)**管理不同版本的软件包,你遇到的问题是因为默认启用的是nginx 1.14的模块流——即使仓库里存在1.22版本,yum/dnf也只会从当前启用的流中拉取对应包。按以下步骤解决:

  1. 查看当前nginx可用的模块流

    dnf module list nginx
    

    输出会显示类似内容,确认存在nginx:1.22的流:

    Oracle Linux 8 Application Stream (x86_64)
    Name      Stream       Profiles        Summary
    nginx     1.14         common [d]     nginx web server
    nginx     1.22         common          nginx web server
    

    其中[d]代表当前默认启用的模块流。

  2. 禁用默认的1.14模块流,启用1.22流

    dnf module disable nginx:1.14 -y
    dnf module enable nginx:1.22 -y
    
  3. 清理缓存并安装nginx-1.22.1

    dnf clean all
    dnf makecache
    dnf install nginx -y
    
  4. 验证安装版本

    nginx -v
    

    正常输出应为nginx version: nginx/1.22.1

内容的提问来源于stack exchange,提问作者Umispo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 14:09:57