我需要安装以下软件包:
gcc: gcc-c++-4.4.7-3.el6.x86_64
Flex: flex-2.5.35-8.el6.x86_64
Bison: bison-2.4.1-5.el6.x86_64
Glib: glib2-devel-2.22.5-7.el6.x86_64 & glibc-devel-2.12-1.107.el6_4.2.x86_64
Pcre: pcre-7.8-6.el6.x86_64 & pcre-devel-7.8-6.el6.x86_64
logrotate: logrotate-3.7.8-16.el6.x86_64
sendmail: sendmail-8.14.4-8.el6.x86_64 & sendmail-cf-8.14.4-8.el6.noarch
yum
从下面的存储库中使用。
# yum repolist
Loaded plugins: package_upload, product-id, search-disabled-repos, subscription-manager
repo id repo name status
!RBC_RBC-Tools-RHEL7_rbc-tools-rhel-7Server-x86_64-rpms rbc-tools-rhel-7Server-x86_64-rpms 9
!rhel-7-server-extras-rpms/x86_64 Red Hat Enterprise Linux 7 Server - Extras (RPMs) 747
!rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Optional (RPMs) 13,201
!rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 18,022
!rhel-7-server-satellite-tools-6.1-rpms/x86_64 Red Hat Satellite Tools 6.1 (for RHEL 7 Server) (RPMs) 86
!rhel-7-server-supplementary-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Supplementary (RPMs) 270
repolist: 32,335
但是,我得到以下错误:
# yum install gcc-c++-4.4.7-3.el6.x86_64
Loaded plugins: package_upload, product-id, search-disabled-repos, subscription-manager
RBC_RBC-Tools-RHEL7_rbc-tools-rhel-7Server-x86_64-rpms | 1.8 kB 00:00:00
rhel-7-server-extras-rpms | 2.0 kB 00:00:00
rhel-7-server-optional-rpms | 2.0 kB 00:00:00
rhel-7-server-rpms | 2.0 kB 00:00:00
rhel-7-server-satellite-tools-6.1-rpms | 2.1 kB 00:00:00
rhel-7-server-supplementary-rpms | 2.3 kB 00:00:00
No package gcc-c++-4.4.7-3.el6.x86_64 available.
Error: Nothing to do
如何解决此错误?我需要添加更多存储库吗?如果是,如何?
如果您正在寻找安装 GCC,您需要做的就是
yum install gcc-c++
如果您可以访问它们,它将获取它的依赖项,否则它将出错。对于其余的包,只需在 <name>-<version number> 之前输入文本名称。yum install flex bison sendmail
只需查看其他软件包是否作为依赖项安装,如果没有返回并使用yum install <name>
.如果您需要更多帮助来理解
yum
,只需键入man yum
以获取更多参考和详细信息yum
。未安装时的示例: