我使用 reposyc 获取 {base,extra,update} centos 存储库,但无法下载源存储库。
我原来的 CentOS-Sources.repo 有这样几行:
[base-source]
name=CentOS-$releasever - Base Sources
baseurl=http://vault.centos.org/centos/$releasever/os/Source/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
当我运行以下命令时
reposync --gpgcheck -l --repoid=base-source --download_path=/mnt/extra
它只是打印这一行:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* fasttrack: mirror.centos.jt.iq
甚至将我的 CentOS-Sources.repo 更改为:
[base-source]
name=CentOS-$releasever - Base Sources
baseurl=http://vault.centos.org/7.7.1908/updates/Source
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
它不起作用。
答案1
尝试使用--source
标志来reposync
下载.src.rpm
文件:
reposync --gpgcheck -l --repoid=base-source --download_path=/mnt/extra --source