yumdownloader --source
打印No Match for argument
或No source RPM found
。将“Enabled”切换为“1”或“0”没有任何效果。
[vboxuser@okdemohost ~]$ yumdownloader --source gcc
Loaded plugins: product-id, refresh-packagekit
epel/metalink | 27 kB 00:00
epel | 4.4 kB 00:00
epel/primary_db | 6.3 MB 00:01
rhel-source | 2.6 kB 00:00 ...
rhel-source/primary_db | 1.6 MB 00:00 ...
rhel-source-beta | 1.3 kB 00:00 ...
rhel-source-beta/primary | 214 B 00:00 ...
rheldvd | 3.9 kB 00:00 ...
rheldvd/primary_db | 3.1 MB 00:00 ...
Enabling epel-source repository
epel-source/metalink | 26 kB 00:00
epel-source | 3.7 kB 00:00
epel-source/primary_db | 1.8 MB 00:00
No source RPM found for gcc-4.4.7-4.el6.x86_64
Nothing to download
回购文件:
[vboxuser@okdemohost ~]$ cat /etc/yum.repos.d/rhel-source.repo
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-source-beta]
name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
红帽版本:
[vboxuser@okdemohost ~]$ lsb_release -i -r
Distributor ID: RedHatEnterpriseServer
Release: 6.5
回购信息:
[vboxuser@okdemohost ~]$ yum repolist all
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
repo id repo name status
InstallMedia Red Hat Enterprise Linux 6.5 disabled
epel Extra Packages for Enterprise Linux 6 - x86_64 enabled: 11,110
epel-debuginfo Extra Packages for Enterprise Linux 6 - x86_64 - Debug disabled
epel-source Extra Packages for Enterprise Linux 6 - x86_64 - Source disabled
rhel-source Red Hat Enterprise Linux 6Server - x86_64 - Source enabled: 0
rhel-source-beta Red Hat Enterprise Linux 6Server Beta - x86_64 - Source enabled: 0
rheldvd Red Hat Enterprise Linux DVD Disk 1 enabled: 3,690
repolist: 14,800
答案1
这是一个已知的错误:https://bugzilla.redhat.com/show_bug.cgi?id=710469
允许源下载的解决方法是使源存储库名称等于基本存储库名称加上“-source”。
例如,要使预先存在的存储库正常[rhel-source]
工作,基础存储库应命名为[rhel]
。