Goal is to identify a package version across distros RPM based Fedora, CentOS, RedHat etc. Can I rely on upstream version to be same on all the distros? If yes then how can I retrieve (RPM or DEB) upstream version number from command line?

Can't post this as an aswer -->

These dependencies that are listed in rpm -qp -requires .rpm are virtual packages if automatic dependencies is specified in .spec file. These virtual packages are NOT library soname but rather just virtual package names (even though they look like soname).

e.g. on Fedora 27, this works

$ rpm -q --whatprovides "libQt5Core.so.5()(64bit)"        

but this doesn't

$ rpm -q --whatprovides libQt5Core.so.5
no package provides libQt5Core.so.5
$ rpm -q --whatprovides libQt5Core
no package provides libQt5Core
$ rpm -q --whatprovides Qt5Core
no package provides Qt5Core

If your own .rpm itself bundles the libraries (i.e. provides these virtual packages) then RPM will not complain if these virtual packages are not installed on the system since they are supplied with your package.

  • 1
    No, and no. Mar 12, 2018 at 4:53
  • 3
    Here is a good example of why you can't, but I'm sure we've got the opposite question around somewhere (if only I can find it). Mar 12, 2018 at 4:56
  • 1
    @MichaelHomer+ the most commonly annoying example is RedHat httpd = Debian apache2 . Mar 12, 2018 at 7:28
  • Reading between the lines it sounds like their might be some other actual goal? Like seeing which is the most recent package across distros, or something else?
    – pbhj
    Mar 12, 2018 at 8:37
  • @pbhj You are right. I want to generate RPM package with manual dependencies and but dont know what version and name to use because this RPM package should be usable across CentOS, Fedora, RedHat and couple of other RPM based distros.
    – PnotNP
    Mar 12, 2018 at 18:06

1 Answer 1


You cannot depend on (all) Linux distributions using the same upstream version of a particular package at any one time as each distribution has its own development cycle.

While you will see a lot of commonality in package names across distributions, there is no guarantee. As a rule of thumb, package names will be mostly the same across a distribution and any derived downstream distributions. Think Debian and Ubuntu for example, or Redhat and CentOS.

  • This. The apache2 webserver package in Debian can be gotten with apt-get install apache2 whereas in RedHat et al it would be yum install httpd. Been so long since I used slackware I'm not sure what that package name would be....
    – ivanivan
    Mar 12, 2018 at 18:59
  • 1
    Since i'm creating one Deb and one RPM package, is it safe to assume that name specified in DEB will be same across all debian based distros? And the same assumption for RPM based distros? It seems from your response that answer would be no.
    – PnotNP
    Mar 12, 2018 at 21:10
  • @PnotNP. Somewhat safe for the major distributions if no dependencies but no guarantees. If you have dependencies, you will probably have to do a package per major distribution.
    – fpmurphy
    Mar 13, 2018 at 2:10

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