在 RHEL 7.6 中安装 Git 时出现问题

在 RHEL 7.6 中安装 Git 时出现问题

我正在尝试安装 git,但出现以下错误,尽管我有有效订阅RHEL 客户端 7.6。

No package git available.
Error: Nothing to do

我运行了以下命令:

[root@localhost /]# yum-config-manager --enablerepo \*
[root@localhost /]# yum clean all
[root@localhost /]# yum install git

这是我的命令的输出yum repolist all

[root@localhost /]# yum repolist all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
epel/x86_64/metalink                                                                                                 | 7.3 kB  00:00:00     
epel                                                                                                                 | 4.7 kB  00:00:00     
google-chrome                                                                                                        | 1.3 kB  00:00:00     
pgdg10                                                                                                               | 4.1 kB  00:00:00     
pgdg12-updates-testing                                                                                               | 4.1 kB  00:00:00     
rhel-7-desktop-rpms                                                                                                  | 3.4 kB  00:00:00     
rpmfusion-free-updates                                                                                               | 3.0 kB  00:00:00     
(1/12): epel/x86_64/group_gz                                                                                         |  88 kB  00:00:05     
(2/12): google-chrome/primary                                                                                        | 1.7 kB  00:00:05     
(3/12): epel/x86_64/updateinfo                                                                                       | 987 kB  00:00:07     
(4/12): pgdg10/7Client/x86_64/group_gz                                                                               |  245 B  00:00:08     
(5/12): pgdg12-updates-testing/7Client/x86_64/primary_db                                                             |  18 kB  00:00:08     
(6/12): epel/x86_64/primary_db                                                                                       | 6.7 MB  00:00:18     
(7/12): rhel-7-desktop-rpms/7Client/x86_64/group                                                                     | 493 kB  00:00:09     
(8/12): pgdg12-updates-testing/7Client/x86_64/group_gz                                                               |  245 B  00:00:16     
(9/12): pgdg10/7Client/x86_64/primary_db                                                                             | 193 kB  00:00:17     
(10/12): rpmfusion-free-updates/x86_64/primary_db                                                                    | 251 kB  00:00:07     
(11/12): rhel-7-desktop-rpms/7Client/x86_64/updateinfo                                                               | 2.6 MB  00:00:12     
(12/12): rhel-7-desktop-rpms/7Client/x86_64/primary_db                                                               |  51 MB  00:01:06     
google-chrome                                                                                                                           3/3
repo id                                                                 repo name                                            status
epel/x86_64                                                             Extra Packages for Enterprise Linux 7 - x86_64       enabled: 13,051
epel-debuginfo/x86_64                                                   Extra Packages for Enterprise Linux 7 - x86_64 - Deb disabled
epel-source/x86_64                                                      Extra Packages for Enterprise Linux 7 - x86_64 - Sou disabled
epel-testing/x86_64                                                     Extra Packages for Enterprise Linux 7 - Testing - x8 disabled
epel-testing-debuginfo/x86_64                                           Extra Packages for Enterprise Linux 7 - Testing - x8 disabled
epel-testing-source/x86_64                                              Extra Packages for Enterprise Linux 7 - Testing - x8 disabled
google-chrome                                                           google-chrome                                        enabled:      3
pgdg10/7Client/x86_64                                                   PostgreSQL 10 7Client - x86_64                       enabled:    544
pgdg10-source/7Client/x86_64                                            PostgreSQL 10 7Client - x86_64 - Source              disabled
pgdg10-source-updates-testing/7Client/x86_64                            PostgreSQL 10 7Client - x86_64 - Source              disabled
pgdg10-updates-testing/7Client/x86_64                                   PostgreSQL 10 7Client - x86_64                       disabled
pgdg12/7Client/x86_64                                                   PostgreSQL 12 7Client - x86_64                       disabled
pgdg12-source/7Client/x86_64                                            PostgreSQL 12 7Client - x86_64 - Source              disabled
pgdg12-source-updates-testing/7Client/x86_64                            PostgreSQL 12 7Client - x86_64 - Source              disabled
pgdg12-updates-testing/7Client/x86_64                                   PostgreSQL 12 7Client - x86_64                       enabled:     27
rhel-7-desktop-beta-debug-rpms/x86_64                                   Red Hat Enterprise Linux 7 Desktop Beta (Debug RPMs) disabled
rhel-7-desktop-beta-rpms/x86_64                                         Red Hat Enterprise Linux 7 Desktop Beta (RPMs)       disabled
rhel-7-desktop-beta-source-rpms/x86_64                                  Red Hat Enterprise Linux 7 Desktop Beta (Source RPMs disabled
rhel-7-desktop-debug-rpms/7Client/x86_64                                Red Hat Enterprise Linux 7 Desktop (Debug RPMs)      disabled
rhel-7-desktop-extras-beta-debug-rpms/x86_64                            Red Hat Enterprise Linux 7 Desktop - Extras Beta (De disabled
rhel-7-desktop-extras-beta-rpms/x86_64                                  Red Hat Enterprise Linux 7 Desktop - Extras Beta (RP disabled
rhel-7-desktop-extras-beta-source-rpms/x86_64                           Red Hat Enterprise Linux 7 Desktop - Extras Beta (So disabled
rhel-7-desktop-extras-debug-rpms/x86_64                                 Red Hat Enterprise Linux 7 Desktop - Extras (Debug R disabled
rhel-7-desktop-extras-rpms/x86_64                                       Red Hat Enterprise Linux 7 Desktop - Extras (RPMs)   disabled
rhel-7-desktop-extras-source-rpms/x86_64                                Red Hat Enterprise Linux 7 Desktop - Extras (Source  disabled
rhel-7-desktop-fastrack-debug-rpms/x86_64                               Red Hat Enterprise Linux 7 Desktop - Fastrack (Debug disabled
rhel-7-desktop-fastrack-rpms/x86_64                                     Red Hat Enterprise Linux 7 Desktop - Fastrack (RPMs) disabled
rhel-7-desktop-fastrack-source-rpms/x86_64                              Red Hat Enterprise Linux 7 Desktop - Fastrack (Sourc disabled
rhel-7-desktop-openstack-10-tools-debug-rpms/7Client/x86_64             Red Hat OpenStack Platform 10 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-10-tools-rpms/7Client/x86_64                   Red Hat OpenStack Platform 10 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-10-tools-source-rpms/7Client/x86_64            Red Hat OpenStack Platform 10 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-11-tools-debug-rpms/x86_64                     Red Hat OpenStack Platform 11 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-11-tools-rpms/x86_64                           Red Hat OpenStack Platform 11 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-11-tools-source-rpms/x86_64                    Red Hat OpenStack Platform 11 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-12-tools-debug-rpms/x86_64                     Red Hat OpenStack Platform 12 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-12-tools-rpms/x86_64                           Red Hat OpenStack Platform 12 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-12-tools-source-rpms/x86_64                    Red Hat OpenStack Platform 12 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-13-tools-debug-rpms/x86_64                     Red Hat OpenStack Platform 13 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-13-tools-rpms/x86_64                           Red Hat OpenStack Platform 13 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-13-tools-source-rpms/x86_64                    Red Hat OpenStack Platform 13 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-14-tools-debug-rpms/x86_64                     Red Hat OpenStack Platform 14 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-14-tools-rpms/x86_64                           Red Hat OpenStack Platform 14 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-14-tools-source-rpms/x86_64                    Red Hat OpenStack Platform 14 Tools for RHEL 7 Deskt disabled
rhel-7-desktop-openstack-7.0-tools-debug-rpms/7Client/x86_64            Red Hat OpenStack Tools 7.0 for Red Hat Enterprise L disabled
rhel-7-desktop-openstack-7.0-tools-rpms/7Client/x86_64                  Red Hat OpenStack Tools 7.0 for Red Hat Enterprise L disabled
rhel-7-desktop-openstack-7.0-tools-source-rpms/7Client/x86_64           Red Hat OpenStack Tools 7.0 for Red Hat Enterprise L disabled
rhel-7-desktop-openstack-8-tools-debug-rpms/7Client/x86_64              Red Hat OpenStack Platform 8 Tools for RHEL 7 Deskto disabled
rhel-7-desktop-openstack-8-tools-rpms/7Client/x86_64                    Red Hat OpenStack Platform 8 Tools for RHEL 7 Deskto disabled
rhel-7-desktop-openstack-8-tools-source-rpms/7Client/x86_64             Red Hat OpenStack Platform 8 Tools for RHEL 7 Deskto disabled
rhel-7-desktop-openstack-9-tools-debug-rpms/7Client/x86_64              Red Hat OpenStack Platform 9 Tools for RHEL 7 Deskto disabled
rhel-7-desktop-openstack-9-tools-rpms/7Client/x86_64                    Red Hat OpenStack Platform 9 Tools for RHEL 7 Deskto disabled
rhel-7-desktop-openstack-9-tools-source-rpms/7Client/x86_64             Red Hat OpenStack Platform 9 Tools for RHEL 7 Deskto disabled
rhel-7-desktop-optional-beta-debug-rpms/x86_64                          Red Hat Enterprise Linux 7 Desktop - Optional Beta ( disabled
rhel-7-desktop-optional-beta-rpms/x86_64                                Red Hat Enterprise Linux 7 Desktop - Optional Beta ( disabled
rhel-7-desktop-optional-beta-source-rpms/x86_64                         Red Hat Enterprise Linux 7 Desktop - Optional Beta ( disabled
rhel-7-desktop-optional-debug-rpms/7Client/x86_64                       Red Hat Enterprise Linux 7 Desktop - Optional (Debug disabled
rhel-7-desktop-optional-fastrack-debug-rpms/x86_64                      Red Hat Enterprise Linux 7 Desktop - Optional Fastra disabled
rhel-7-desktop-optional-fastrack-rpms/x86_64                            Red Hat Enterprise Linux 7 Desktop - Optional Fastra disabled
rhel-7-desktop-optional-fastrack-source-rpms/x86_64                     Red Hat Enterprise Linux 7 Desktop - Optional Fastra disabled
rhel-7-desktop-optional-rpms/7Client/x86_64                             Red Hat Enterprise Linux 7 Desktop - Optional (RPMs) disabled
rhel-7-desktop-optional-source-rpms/7Client/x86_64                      Red Hat Enterprise Linux 7 Desktop - Optional (Sourc disabled
rhel-7-desktop-rh-common-beta-debug-rpms/x86_64                         Red Hat Enterprise Linux 7 Desktop - RH Common Beta  disabled
rhel-7-desktop-rh-common-beta-rpms/x86_64                               Red Hat Enterprise Linux 7 Desktop - RH Common Beta  disabled
rhel-7-desktop-rh-common-beta-source-rpms/x86_64                        Red Hat Enterprise Linux 7 Desktop - RH Common Beta  disabled
rhel-7-desktop-rh-common-debug-rpms/7Client/x86_64                      Red Hat Enterprise Linux 7 Desktop - RH Common (Debu disabled
rhel-7-desktop-rh-common-rpms/7Client/x86_64                            Red Hat Enterprise Linux 7 Desktop - RH Common (RPMs disabled
rhel-7-desktop-rh-common-source-rpms/7Client/x86_64                     Red Hat Enterprise Linux 7 Desktop - RH Common (Sour disabled
rhel-7-desktop-rhceph-1.3-tools-debug-rpms/7Client/x86_64               Red Hat Ceph Storage Tools 1.3 for Red Hat Enterpris disabled
rhel-7-desktop-rhceph-1.3-tools-rpms/7Client/x86_64                     Red Hat Ceph Storage Tools 1.3 for Red Hat Enterpris disabled
rhel-7-desktop-rhceph-1.3-tools-source-rpms/7Client/x86_64              Red Hat Ceph Storage Tools 1.3 for Red Hat Enterpris disabled
rhel-7-desktop-rhceph-2-tools-debug-rpms/7Client/x86_64                 Red Hat Ceph Storage Tools 2 for Red Hat Enterprise  disabled
rhel-7-desktop-rhceph-2-tools-rpms/7Client/x86_64                       Red Hat Ceph Storage Tools 2 for Red Hat Enterprise  disabled
rhel-7-desktop-rhceph-2-tools-source-rpms/7Client/x86_64                Red Hat Ceph Storage Tools 2 for Red Hat Enterprise  disabled
rhel-7-desktop-rhn-tools-beta-debug-rpms/x86_64                         RHN Tools for Red Hat Enterprise Linux 7 Desktop Bet disabled
rhel-7-desktop-rhn-tools-beta-rpms/x86_64                               RHN Tools for Red Hat Enterprise Linux 7 Desktop Bet disabled
rhel-7-desktop-rhn-tools-beta-source-rpms/x86_64                        RHN Tools for Red Hat Enterprise Linux 7 Desktop Bet disabled
rhel-7-desktop-rhn-tools-debug-rpms/7Client/x86_64                      RHN Tools for Red Hat Enterprise Linux 7 Desktop (De disabled
rhel-7-desktop-rhn-tools-rpms/7Client/x86_64                            RHN Tools for Red Hat Enterprise Linux 7 Desktop (RP disabled
rhel-7-desktop-rhn-tools-source-rpms/7Client/x86_64                     RHN Tools for Red Hat Enterprise Linux 7 Desktop (So disabled
rhel-7-desktop-rpms/7Client/x86_64                                      Red Hat Enterprise Linux 7 Desktop (RPMs)            enabled: 19,274
rhel-7-desktop-satellite-tools-6-beta-debug-rpms/x86_64                 Red Hat Satellite Tools 6 Beta (for RHEL 7 Desktop)  disabled
rhel-7-desktop-satellite-tools-6-beta-rpms/x86_64                       Red Hat Satellite Tools 6 Beta (for RHEL 7 Desktop)  disabled
rhel-7-desktop-satellite-tools-6-beta-source-rpms/x86_64                Red Hat Satellite Tools 6 Beta (for RHEL 7 Desktop)  disabled
rhel-7-desktop-satellite-tools-6-puppet-upgrade-beta-debug-rpms/x86_64  Red Hat Satellite Tools 6 Beta - Puppet Upgrade (for disabled
rhel-7-desktop-satellite-tools-6-puppet-upgrade-beta-rpms/x86_64        Red Hat Satellite Tools 6 Beta - Puppet Upgrade (for disabled
rhel-7-desktop-satellite-tools-6-puppet-upgrade-beta-source-rpms/x86_64 Red Hat Satellite Tools 6 Beta - Puppet Upgrade (for disabled
rhel-7-desktop-satellite-tools-6.1-debug-rpms/x86_64                    Red Hat Satellite Tools 6.1 (for RHEL 7 Desktop) (De disabled
rhel-7-desktop-satellite-tools-6.1-rpms/x86_64                          Red Hat Satellite Tools 6.1 (for RHEL 7 Desktop) (RP disabled
rhel-7-desktop-satellite-tools-6.1-source-rpms/x86_64                   Red Hat Satellite Tools 6.1 (for RHEL 7 Desktop) (So disabled
rhel-7-desktop-satellite-tools-6.2-debug-rpms/x86_64                    Red Hat Satellite Tools 6.2 (for RHEL 7 Desktop) (De disabled
rhel-7-desktop-satellite-tools-6.2-rpms/x86_64                          Red Hat Satellite Tools 6.2 (for RHEL 7 Desktop) (RP disabled
rhel-7-desktop-satellite-tools-6.2-source-rpms/x86_64                   Red Hat Satellite Tools 6.2 (for RHEL 7 Desktop) (So disabled
rhel-7-desktop-satellite-tools-6.3-debug-rpms/x86_64                    Red Hat Satellite Tools 6.3 (for RHEL 7 Desktop) (De disabled
rhel-7-desktop-satellite-tools-6.3-puppet4-debug-rpms/x86_64            Red Hat Satellite Tools 6.3 - Puppet 4 (for RHEL 7 D disabled
rhel-7-desktop-satellite-tools-6.3-puppet4-rpms/x86_64                  Red Hat Satellite Tools 6.3 - Puppet 4 (for RHEL 7 D disabled
rhel-7-desktop-satellite-tools-6.3-puppet4-source-rpms/x86_64           Red Hat Satellite Tools 6.3 - Puppet 4 (for RHEL 7 D disabled
rhel-7-desktop-satellite-tools-6.3-rpms/x86_64                          Red Hat Satellite Tools 6.3 (for RHEL 7 Desktop) (RP disabled
rhel-7-desktop-satellite-tools-6.3-source-rpms/x86_64                   Red Hat Satellite Tools 6.3 (for RHEL 7 Desktop) (So disabled
rhel-7-desktop-satellite-tools-6.4-debug-rpms/x86_64                    Red Hat Satellite Tools 6.4 (for RHEL 7 Desktop) (De disabled
rhel-7-desktop-satellite-tools-6.4-rpms/x86_64                          Red Hat Satellite Tools 6.4 (for RHEL 7 Desktop) (RP disabled
rhel-7-desktop-satellite-tools-6.4-source-rpms/x86_64                   Red Hat Satellite Tools 6.4 (for RHEL 7 Desktop) (So disabled
rhel-7-desktop-satellite-tools-6.5-debug-rpms/x86_64                    Red Hat Satellite Tools 6.5 (for RHEL 7 Desktop) (De disabled
rhel-7-desktop-satellite-tools-6.5-rpms/x86_64                          Red Hat Satellite Tools 6.5 (for RHEL 7 Desktop) (RP disabled
rhel-7-desktop-satellite-tools-6.5-source-rpms/x86_64                   Red Hat Satellite Tools 6.5 (for RHEL 7 Desktop) (So disabled
rhel-7-desktop-source-rpms/7Client/x86_64                               Red Hat Enterprise Linux 7 Desktop (Source RPMs)     disabled
rhel-7-desktop-supplementary-beta-debug-rpms/x86_64                     Red Hat Enterprise Linux 7 Desktop - Supplementary B disabled
rhel-7-desktop-supplementary-beta-rpms/x86_64                           Red Hat Enterprise Linux 7 Desktop - Supplementary B disabled
rhel-7-desktop-supplementary-beta-source-rpms/x86_64                    Red Hat Enterprise Linux 7 Desktop - Supplementary B disabled
rhel-7-desktop-supplementary-debug-rpms/7Client/x86_64                  Red Hat Enterprise Linux 7 Desktop - Supplementary ( disabled
rhel-7-desktop-supplementary-rpms/7Client/x86_64                        Red Hat Enterprise Linux 7 Desktop - Supplementary ( disabled
rhel-7-desktop-supplementary-source-rpms/7Client/x86_64                 Red Hat Enterprise Linux 7 Desktop - Supplementary ( disabled
rhel-7-desktop-thirdparty-oracle-java-beta-rpms/x86_64                  Red Hat Enterprise Linux 7 Desktop - Oracle Java Bet disabled
rhel-7-desktop-thirdparty-oracle-java-beta-source-rpms/x86_64           Red Hat Enterprise Linux 7 Desktop - Oracle Java Bet disabled
rhel-7-desktop-thirdparty-oracle-java-rpms/7Client/x86_64               Red Hat Enterprise Linux 7 Desktop - Oracle Java (RP disabled
rhel-7-desktop-thirdparty-oracle-java-source-rpms/7Client/x86_64        Red Hat Enterprise Linux 7 Desktop - Oracle Java (So disabled
rpmfusion-free-updates/x86_64                                           RPM Fusion for EL 7 - Free - Updates                 enabled:    246
rpmfusion-free-updates-debuginfo/x86_64                                 RPM Fusion for EL 7 - Free - Updates Debug           disabled
rpmfusion-free-updates-source/x86_64                                    RPM Fusion for EL 7 - Free - Updates Source          disabled
rpmfusion-free-updates-testing/x86_64                                   RPM Fusion for EL 7 - Free - Test Updates            disabled
rpmfusion-free-updates-testing-debuginfo/x86_64                         RPM Fusion for EL 7 - Free - Test Updates Debug      disabled
rpmfusion-free-updates-testing-source/x86_64                            RPM Fusion for EL 7 - Free - Test Updates Source     disabled
repolist: 33,145

我提到了这个邮政并执行以下命令得到相同的错误:

[root@localhost /]# yum-config-manager --enablerepo rhel-7-desktop-optional-rpms

我不确定我可能哪里出错了?

答案1

我没有看到开发者工具集回购在您的列表中;我建议使用访问红帽开发者工具集用户指南实现您的目标。

第一步是使用 Red Hat Software Collections 或 Red Hat Developer Tools 访问该软件。例如,在 RHEL 工作站上使用开发人员工具,您可以:

  1. 使用以下命令启用存储库:subscription-manager repos --enable rhel-7-workstation-devtools-rpms然后

  2. 将 Red Hat Developer Tools 密钥添加到您的系统:

    # cd /etc/pki/rpm-gpg
    # wget -O RPM-GPG-KEY-redhat-devel https://www.redhat.com/security/data/a5787476.txt
    # rpm --import RPM-GPG-KEY-redhat-devel
    
  3. 然后安装 git:yum install git或元包:yum install devtoolset-2-vc或整个工具集:yum install devtoolset-2

相关内容