1.4. 安装 LLVM Toolset

完成以下步骤,安装 LLVM Toolset,包括所有开发和调试工具以及依赖软件包。

先决条件

流程

在 Red Hat Enterprise Linux 7 中,运行以下命令安装 llvm-toolset-15.0 集合:

# yum install llvm-toolset-15.0
重要

这不会在 Red Hat Enterprise Linux 7 上安装 LLDB 调试器。要安装 LLDB 调试器,请运行:

# yum install llvm-toolset-15.0-lldb

在 Red Hat Enterprise Linux 8 中,运行以下命令安装 llvm-toolset 模块:

# yum module install llvm-toolset
重要

这不会在 Red Hat Enterprise Linux 8 上安装 LLDB 调试器或 python3-lit 软件包。要安装 LLDB 调试器和 python3-lit 软件包,请运行:

# yum install lldb python3-lit

在 Red Hat Enterprise Linux 9 中,运行以下命令安装 llvm-toolset 软件包:

# dnf install llvm-toolset
重要

这不会在 Red Hat Enterprise Linux 9 上安装 LLDB 调试器或 python3-lit 软件包。要安装 LLDB 调试器和 python3-lit 软件包,请运行:

# dnf install lldb python3-lit