Skip to content
Search RHEL

This page uses Chinese content. Search opens the Chinese documentation.

    Browse this documentation

    RHEL 10 AppStream:模块流退场,nodejs 直接 dnf install

    This content is not available in your language yet.

    RHEL 9 里装 nodejs 常写 dnf module enable nodejs:20 && dnf install nodejs。到 RHEL 10,这套流程不再适用:模块流(modularity)已被标记弃用,AppStream 只剩普通 RPM。

    在 PVE 390 rhel10-lab(RHEL 10.2)执行:

    Terminal window
    dnf module list
    dnf module list nodejs
    dnf -q list --available nodejs
    dnf repoquery --repo=rhel-10-for-x86_64-appstream-rpms | wc -l

    E3 记录:plans/content-expansion/evidence/rhel/rhel-appstream/run.json(4 步,含 module/package/count)。

    $ dnf module list
    WARNING: modularity is deprecated, and functionality will be removed in a
    future release of DNF5.
    (没有任何模块流)
    $ dnf module list nodejs
    Error: No matching Modules to list

    RHEL 10 的 AppStream 不再用“流”区分版本,nodejs 就是普通包。

    $ dnf -q list --available nodejs
    Available Packages
    nodejs.x86_64 1:22.23.2-3.el10_2 rhel-10-for-x86_64-appstream-rpms
    Terminal window
    sudo dnf install -y nodejs
    node -v
    # v22.23.2

    不需要 module enable,也不存在 nodejs:20/nodejs:22 的流选择。

    $ dnf repoquery --repo=rhel-10-for-x86_64-appstream-rpms | wc -l
    14568

    AppStream 仍然是二进制、运行时和依赖的主要来源;BaseOS 只放最小系统核心。

    RHEL 9 常见写法:

    Terminal window
    dnf module enable nodejs:20 -y
    dnf install nodejs -y

    到 RHEL 10 应改为:

    Terminal window
    dnf install nodejs -y

    如果脚本里还有 dnf module list --enabled、dnf module reset,在 10 上要么报 “No matching Modules”,要么只给弃用警告;先删掉这些步骤,再按实际包版本验证。

    • dnf module list 是否只有弃用警告;
    • 目标包是否在 AppStream(repoquery --repo);
    • 脚本是否还调用 dnf module enable/reset;
    • 版本锁定改用 versionlock;
    • 在 RHEL 10 上重跑安装,不只看文档。
    • 未在 RHEL 9 上复测 module 命令;
    • 未测试所有 AppStream 包的版本策略;
    • 未测试 dnf module 在 dnf5 中的最终移除;
    • 未测试第三方模块流。