打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
CentOS 6 SRPMS / Source RPM’s repository | Rambletronics

While building Flashcache on one of my servers for a client and needed to download the kernel’s source RPM. I searched everywhere for the correct repository, and came to the conclusion it doesn’t exist for CentOS 6 anymore.

So if you still need it there is a workaround, you can use the CentOS Vault, which according to the CentOS-Vault.repo file which may be pre-installed in your OS says:

CentOS Vault holds packages from previous releases within the same CentOS Version these are packages obsoleted by the current release and should usually not be used in production.

So with that small warning I shall continue to show you the steps to add the source part of the CentOS Vault into the repo. Just copy and paste the following, if you can’t copy and paste it then just use a text editor of your choice and append the text. The command is just to make it easier.

cat >> /etc/yum.repos.d/CentOS-Vault.repo <<END[base-SRPMS-6.4]name=CentOS-$releasever – Base SRPMSbaseurl=http://vault.centos.org/6.4/os/Sourcegpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6priority=1enabled=1[updates-SRPMS-6.4]name=CentOS-$releasever – Base SRPMSbaseurl=http://vault.centos.org/6.4/updates/Sourcegpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6priority=1enabled=1END

This should be easy to modify for future versions of CentOS 6, all you have to do after you’ve run the command above is to update yum’s repository cache.

yum -y update

Then you can go ahead and download whatever source RPM you want, using the yumdownloader command which if you don’t have it is available in the yum-utils package. In my case for an example I used:

yumdownloader --source kernel.x86_64

That’s it really, it will just download the source RPM to the current directory which you can rebuilt or do whatever with.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
CentOS6的yum源失效官方停止维护更新及解决
CentOS 升级至指定版本
安装memtester报错:./compile: line 3: exec: cc: not found解决办法
CentOS 6的服务器后执行yum后发现出现Error: Cannot find a valid baseurl for repo: base解决办法
CentOS获取软件安装包源码
centos6无法使用yum源的问题removing mirrorlist with no valid mirrors: /var/cache/yum/x86
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服