I am trying to install software that is built on CentOS 4.7. Do you know if it will also run in Ubuntu? I read CentOS is 100% binary compatible. Is the same true for the most recent version of Ubuntu?

  • 1
    “100% binary compatible” is meaningless: compatible with what? As Caleb says, the answer to that is with RHEL. – Gilles 'SO- stop being evil' Jun 23 '11 at 9:45

Linux Standard Base (LSB) binaries are supposed to be compatible between distros that support LSB. CentOS has LSB support. LSB support is available in Ubuntu as well, but I don't know if the relevant LSB-packages are installed by default or not. It is possible to test if an application is binary compatible.

Note that LSB is controversial, both the standard itself and whether/how much impact it has had.

| improve this answer | |

An executable compiled for a Linux distribution will work on another distribution if that other distribution has the required shared libraries. CentOS has pretty old library versions, so Ubuntu's versions may be too recent; but often if Ubuntu only has libfoo5 and libfoo6 and you need libfoo3 you can grab it from an earlier Ubuntu release.

CentOS and Ubuntu use different packaging systems: rpm vs. deb. You can convert a rpm to a deb with alien. The resulting package may or may not be installable depending on whether you have the required dependencies. It may be easier to convert the rpm to a plain archive (again with alien) and unpack that in a separate directory under /opt or /usr/local.

If the program doesn't come with a list of dependencies, you can run ldd /path/to/binary to see what libraries it requires. You'll see output like libfoo.so.4 => not found if something's missing.

| improve this answer | |
  • How do you use the "alien" function? on the Gnome command prompt? – Concerned_Citizen Jun 23 '11 at 16:22
  • @GTyler Yes, alien is a command line program. I don't know if there's a GUI around it. If you're unfamiliar with the command line, I recommend trying to get a binary package for Ubuntu. – Gilles 'SO- stop being evil' Jun 23 '11 at 20:28

CentOS is "100% binary compatible" with its commercial counterpart, RedHat Enterprise Linux. Because RHEL is a licensed system including support contracts and various enterprisey things, not everybody wants to run it. However in an open source world all development has to be shared, so while they charge for support contracts, media and whatever, they still have to share the source. CentOS is a re-packaging of that to provide it to the community, for free.

Furthermore, then "100% compatibility" is only between the equivalent versions of RHEL and CentOS. Library versions change with each major release, but since these projects release in sync you can exchange packages between them as long as they are both setup for the same major version.

The differences between distros, particularly RPM based distros like CentOS and Debian based ones like Ubuntu can be legion, and a given package will not be portable between them. However the overall systems are roughly the same, software developed for one can usually easily be compiled for the other, it just has to be compiled and packaged a little differently. If you care to pull in all the right library versions, the binaries from one will actually work on another. See Gilles's answer.

| improve this answer | |

CentOS is long-term stable so it has older libraries that binaries compiled on newer systems won't link with. CentOS uses the rpm package manager, and Ubuntu uses Debian apt. So the packages are not even compatible.

Generally, if you want it on CentOS and it doesn't have it already you'll have to build an RPM from source, on another CentOS machine.

| 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.