I normally start with a Minimal Centos 7 and run

yum install perl-libs.x86_64

This works perfectly.

I am now trying to create an RPM spec file that uses the "Requires" clause to package dependencies like:

Requires:        perl-libs.x86_64

However, when I do

yum install my-rpm-1.0.0.el7.x86_64.rpm

I get error messages that look like:

Requires: perl-libs(x86_64) = 4:5.16.3-299.el7_9
Available: 4:perl-libs-5.16.3-293.el7.x86_64
Available: 4:perl-libs-5.16.3-294.el7_6.x86_64

You could try using --skip-broken to work around this problem
You could try running: rpm -Va --nofiles --nodigest

Does anyone know what is wrong with my "Requires:" clause in my spec file? I just want the spec file to automatically do "yum install perl-libs" via the "Requires" clause.

  • 2
    Try to use perl-libs without adding the architecture. Also it would help if you post your .spec file. Commented Jul 11, 2022 at 19:28
  • 1
    same way as in unix.stackexchange.com/questions/709042/… but getting the version of the perl module instead of the java module
    – thrig
    Commented Jul 11, 2022 at 20:43

1 Answer 1


Instead of adding a dependency on perl-libs, a better practice is using Perl dependency generators. This can be achieved by simply including the following:

BuildRequires:  perl-generators

Not only it will make your resulting package set up with Perl runtime as a dependency, but also will attempt to detect any Perl module packages your program needs and set them up as dependencies as well.

  • when I tried this, I get an error message "Failed build dependencies: perl-generators is needed by my-rpm-1.0.0.el7.x86_64" Commented Jul 12, 2022 at 21:32
  • Surely need to install build dependencies before building: yum-builddep you.spec Commented Jul 13, 2022 at 6:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .