CentOS 8/RHEL 8下compat-openmpi包的获取与安装咨询
获取并安装CentOS 8/RHEL 8版本的compat-openmpi包
一、获取渠道
- CentOS 8:官方仓库已归档至CentOS Vault,可启用Vault仓库及PowerTools存档仓库获取对应兼容包。
- RHEL 8:若有Red Hat订阅,启用
codeready-builder-for-rhel-8-x86_64-rpms仓库(原PowerTools/Software Collections),仓库内包含兼容版本的OpenMPI包。 - 通用第三方仓库:EPEL(Extra Packages for Enterprise Linux)仓库提供额外开源软件包,可能包含所需的compat-openmpi版本。
二、安装步骤
1. CentOS 8 基于Vault仓库安装
- 备份原有仓库配置文件:
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak - 修改
/etc/yum.repos.d/CentOS-Base.repo文件:注释所有mirrorlist行,取消baseurl行的注释,并将baseurl中的地址替换为http://vault.centos.org/$releasever/Base/$basearch/os/(示例片段):[base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=Base&infra=$infra baseurl=http://vault.centos.org/$releasever/Base/$basearch/os/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial - 启用PowerTools仓库:
dnf config-manager --set-enabled powertools - 搜索并安装目标包(以
compat-openmpi40为例,可根据需求调整版本):dnf search compat-openmpi dnf install compat-openmpi40
2. RHEL 8 基于订阅仓库安装
- 启用CodeReady Builder仓库:
subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms - 搜索并安装目标包:
dnf search compat-openmpi dnf install compat-openmpi40
3. 基于EPEL仓库安装(CentOS 8/RHEL 8通用)
- 安装EPEL仓库:
# CentOS 8 dnf install epel-release # RHEL 8 dnf install epel-release-latest-8.noarch.rpm - 搜索并安装目标包:
dnf search compat-openmpi dnf install compat-openmpi*
注意:不同兼容版本的包命名不同(如compat-openmpi16对应1.6版本,compat-openmpi40对应4.0版本),建议先通过dnf search确认可用版本后再安装。
内容的提问来源于stack exchange,提问作者jms1980
相关产品推荐
相关产品推荐

