Centos
如何將 Fedora Repo 添加到 CentOS 7 安裝中?
我有一個 CentOS 7 x86_64 安裝,我想在其上安裝一個名為
frama-c
. 到目前為止,這個包不在我配置的 repos 中:# yum search frama-c Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.datente.com * epel: epel.besthosting.ua * epel-testing: epel.besthosting.ua * extras: centos.mirror.iphh.net * updates: artfiles.org Warning: No matches found for: frama-c No matches found
我已經
fullfilelist
從https://dl.fedoraproject.org/pub/fedora/下載了它,當我 grep for frama-c 時,結果看起來很有希望:$ grep 'development.*x86_64.*frama-c' fullfilelist.txt ./linux/development/26/Everything/x86_64/debug/tree/Packages/f/frama-c-debuginfo-1.14-1.fc26.x86_64.rpm ./linux/development/26/Everything/x86_64/os/Packages/f/frama-c-doc-1.14-1.fc26.noarch.rpm ./linux/development/26/Everything/x86_64/os/Packages/f/frama-c-emacs-1.14-1.fc26.noarch.rpm ./linux/development/26/Everything/x86_64/os/Packages/f/frama-c-xemacs-1.14-1.fc26.noarch.rpm ./linux/development/26/Everything/x86_64/os/Packages/f/frama-c-1.14-1.fc26.x86_64.rpm ./linux/development/rawhide/Everything/x86_64/debug/tree/Packages/f/frama-c-debuginfo-1.14-1.fc27.x86_64.rpm ./linux/development/rawhide/Everything/x86_64/os/Packages/f/frama-c-doc-1.14-1.fc27.noarch.rpm ./linux/development/rawhide/Everything/x86_64/os/Packages/f/frama-c-1.14-1.fc27.x86_64.rpm ./linux/development/rawhide/Everything/x86_64/os/Packages/f/frama-c-emacs-1.14-1.fc27.noarch.rpm ./linux/development/rawhide/Everything/x86_64/os/Packages/f/frama-c-xemacs-1.14-1.fc27.noarch.rpm
將 rawhide 儲存庫添加到我目前的儲存庫列表中的正確方法是什麼,這樣我就可以使用單個儲存庫進行安裝
yum install frama-c
?
為不同的系統混合軟體包從來都不是一個好主意。它可能有效,但您可能會遇到難以調試的問題。但很可能它不會起作用。
最好的方法是為您的系統重建軟體包。您可以要求目前的包維護者為您做這件事(添加 EPEL7 包,它將顯示在您的 EPEL 儲存庫中)或自己做:
- 從Koji下載最新的 SRPM 包:
wget https://kojipkgs.fedoraproject.org//packages/frama-c/1.14/1.fc27/src/frama-c-1.14-1.fc27.src.rpm
- 為您的系統重建它(可能解決缺少的依賴項,如果它們可用):
rpmbuild --rebuild frama-c-1.14-1.fc27.src.rpm
- 安裝包:
yum install ~/rpmbuild/RPMS/.../path/../to/your.rpms