这是一个在 CentOS 8 系统上使用 yum 安装软件包的命令:

[root@bogon yum.repos.d]# sudo yum install git scons gcc-c++ python-devel python3-devel protobuf-devel protobuf-compiler zlib-devel
Warning: failed loading '/etc/yum.repos.d/epel.repo', skipping.
CentOS-8 - Base - mirrors.aliyun.com            1.3 MB/s | 4.6 MB     00:03    
CentOS-8 - Extras - mirrors.aliyun.com           39 kB/s |  10 kB     00:00    
CentOS-8 - AppStream - mirrors.aliyun.com       845 kB/s | 8.4 MB     00:10    
No match for argument: scons
No match for argument: python-devel
No match for argument: protobuf-devel
Error: Unable to find a match: scons python-devel protobuf-devel
[root@bogon yum.repos.d]# python

其中包括 git、scons、gcc-c++、python-devel、python3-devel、protobuf-devel、protobuf-compiler 和 zlib-devel。

但是安装过程中出现了一些问题,提示没有找到 scons、python-devel 和 protobuf-devel 软件包的匹配项。

可能的解决方案:

  • 检查 EPEL 仓库是否已启用: sconspython-develprotobuf-devel 软件包通常位于 EPEL 仓库中。您需要确保已启用 EPEL 仓库。
  • 添加 EPEL 仓库: 如果 EPEL 仓库尚未启用,您可以使用以下命令添加:
[root@bogon yum.repos.d]# sudo yum install epel-release
  • 更新软件包列表: 添加 EPEL 仓库后,您需要更新软件包列表以使新的软件包可用:
[root@bogon yum.repos.d]# sudo yum update
  • 重新尝试安装: 完成以上步骤后,您可以再次尝试安装所需的软件包。

最后一行是进入 Python 解释器的命令。

CentOS 8 安装软件包错误:无法找到 scons、python-devel 和 protobuf-devel

原文地址: https://www.cveoy.top/t/topic/oyuD 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录