The rpm spec file for my package looks like this:

Requires:mysql-server >= 5.5.30, java >= 1.6, p7zip, openssl >= 1.0.2g

I have an RHEL system where the OpenSSL version is this:

[ag@rhel1]# openssl 
OpenSSL> version 
OpenSSL 1.0.1e-fips 11 Feb 2013
[ag@rhel1]# rpm -q --whatprovides openssl

When I try to test the install of my RPM package, it is supposed to fail because my package requires a minimum of 1.0.2g whereas 1.0.1e is installed. However, the installation succeeds without any problem. What am I missing here?


As far as I know, the comparison should work...

How are you installing the rpm? E.g. do you use yum localinstall or rpm?

Can you check if the rpm you built contains the correct requirements? (Using rpm -qip --requires YourPackage.rpm)

You can check how rpm does version comparison with the rpmdevtools:

# yum -y install rpmdevtools
# rpmdev-vercmp openssl-1.0.1e-51.el7_2.4.x86_64 openssl-1.0.2g
openssl-1.0.1e-51.el7_2.4.x86_64 < openssl-1.0.2g

PS. The --whatprovides only shows you which package on you system provides the openssl capability. If you want to know what exactly the installed package provides, you have to run rpm -q --provides openssl-1.0.1e-51.el7_2.4.x86_64

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.