如何将 Fedora Repo 添加到 CentOS 7 安装中?

如何将 Fedora Repo 添加到 CentOS 7 安装中?

我有一个 CentOS 7 x86_64 安装,我想在其中安装一个名为frama-c.该包不在我到目前为止配置的存储库中:

# 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

我已经下载fullfilelisthttps://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

答案1

为不同的系统混合使用软件包从来都不是一个好主意。它可能有效,但您可能会遇到难以调试的问题。但很可能它不会起作用。

最好的方法是为您的系统重建软件包。您可以要求当前的软件包维护者为您执行此操作(添加 EPEL7 软件包,它将显示在您的 EPEL 存储库中),也可以您自己执行此操作:

  • 从以下位置下载最新的 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
    

相关内容