How to add Fedora Repo to a CentOS 7 installation?
It is never good idea to mix packages for different systems. It might work, but you might encounter hard-to-debug problems. But most probably it will not work.
The best way is to rebuild the package for your system. Either you can ask the current package maintainer to do it for you (add EPEL7 package, which will show up in your EPEL repository) or do it on your own:
-
Download the latest SRPM package from Koji:
wget https://kojipkgs.fedoraproject.org//packages/frama-c/1.14/1.fc27/src/frama-c-1.14-1.fc27.src.rpm
-
Rebuild it for your system (possibly resolve missing dependencies, if they are available):
rpmbuild --rebuild frama-c-1.14-1.fc27.src.rpm
-
Install the package:
yum install ~/rpmbuild/RPMS/.../path/../to/your.rpms
Related videos on Youtube
Thangamani J
Good afternoon, gentlemen. I am a HAL 9000 computer. I became operational at the H.A.L. plant in Urbana, Illinois on the 12th of January 1992. My instructor was Mr. Langley, and he taught me to sing a song. If you'd like to hear it I can sing it for you.
Updated on September 18, 2022Comments
-
Thangamani J over 1 year
I have a CentOS 7 x86_64 installation onto which I want to install a package called
frama-c
. This package is not in the repos I have configured so far:# 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
I have downloaded the
fullfilelist
from https://dl.fedoraproject.org/pub/fedora/ and when I grep for frama-c the result looks promising:$ 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
What is the proper way to add, say the rawhide repository to my current list of repos so I can install with a single
yum install frama-c
? -
Thangamani J about 7 yearsIt is my understanding that CentOS is a Red Hat-clone, and Fedora is the Red Hat testing ground, so as a first approximation they should be "compatible". Is this too far fetched? I know there are no guarantees, but it's not like I'm trying to fit a square peg in a round hole, or am I? The problem with building frama-c from source is the tons of partially outdated dependencies, e.g. it needs ocaml 4.02 when CentOS 7 has as of today ocaml 4.01.1 -- and this is only the beginning.
-
Jakuje about 7 yearsIt is very far fetched. They are compatible by using the same packaging system -- rpm (therefore you can simply rebuild the packages as pointed out in this answer if you have the dependencies). But they have different kernel versions, gcc, glibc and many other libraries that are not always compatible. If some dependencies are older than needed, you might have more luck installing some package from older Fedora version, which should work with older ocaml (give a try to one or two years old for example).
-
Thangamani J about 7 yearsThe rpmbuild command stops with
Installing frama-c-1.14-1.fc27.src.rpm
,error: line 61: Unknown tag: Suggests: alt-ergo
. Do you have a suggestion how to proceed? Thanks for taking the time to answer!