I have generated two RPMs. One for CentOS 6 and one for CentOS 7.
my-package-0.0.1-1.el6.x86_64
my-package-0.0.1-1.el7.x86_64
When I do a yum info my-package
on a CentOS 6 machine, it gives me the el7 information. When I do yum install my-package
it does the same, gets the el7 version. Why is it doing this? I'm trying to avoid installing a el7 version on a el6 machine.
Copyright Notice:Content Author:「codeMonkey」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/34091614/yum-trying-to-install-el7-release-on-centos-6