Is Ubuntu LTS binary compatible with Debian?

11,419

Solution 1

Ubuntu is derived from Sid, the unstable and rolling release version of Debian, every Ubuntu major release is nothing more than a Sid frozen at a certain point in time, and enriched with everything that transforms a Debian into an Ubuntu distribution.

The answer to your question is no.

Some libraries are also placed in directories with different naming conventions. The Ubuntu kernel is not even close to the vanilla flavour and is full of patches.

Solution 2

They are not necessarily binary compatible. That being said, most packages will probably work fine. I've done this on occasion and I've never had a problem.

Although, it's not recommended to mix Debian and Ubuntu packages on a single system. If you're going to do it try to keep it at a minimum. If you're pulling in too much of the other, then perhaps you really just want the other. I'd say by the time you feel you need to add a foreign source you're probably running the wrong one.

The closer in time the freeze of the two releases (i.e., the freeze of Ubuntu LTS and Debian's release) the better compatibility you'll have.

If it's a third party package in deb format that says it's for one, it will almost certainly work on the other with few issues.

Keep in mind that this is anecdotal and just my experience. There really is no guarantee or even implication of cross-compatibility. Don't expect either the Debian or Ubuntu communities to give you much sympathy if things go wrong. In that event you're mostly on your own. As long as you're okay with that then feel free to give it a try.

Solution 3

No, Debian and Ubuntu are not binary compatible. Debian and Ubuntu may use different compilers with different ABI, different kernel versions, different libraries, different packages/version etc. As not all Ubuntu packages are in Debian (and vice versa) deb packages may also depend on uninstallable versions.

RedHat and CentOS are the same as CentOS basically gets all the source packages from RedHat and compiles them. But Ubuntu does much more like providing own packages, package own Software, use older or newer versions of upstream software, fix bugs etc.

So no technically they are not binary compatible.

I may made it sound worse than it is in reality. BUT it is important to understand that the relationship between Ubuntu and Debian is NOT anything like between rhel and CentOS

Solution 4

Ubuntu/Debian compatibility

tl;dr

Not technically, but many packages are.

How to get the best chance

Use Ubuntu LTS and Debian Stable, or Ubuntu and Debian Sid/Testing.

Differences

  • Ubuntu and Debian use different compilers. AFAIK Ubuntu is compiled on the preceding Ubuntu, whereas Debian is compiled on the preceding Stable.
  • Ubuntu and Debian have some libraries in different places.
  • Ubuntu LTS uses upstart, whereas Debian uses systemd.
  • Ubuntu and Debian have different package names.

How to make it work

Do

  • Install only isolated packages.
  • Install them only on non-critical machines.

Don't

  • Add foreign sources.
  • Install too many packages from the other distro.
  • Install critical libraries from the other distro. For example, adding a browser from the other system is OK. Adding a libc6 isn't.
Share:
11,419

Related videos on Youtube

Nils
Author by

Nils

I studied information science and did computers from the old Commodore VC-20 onwards. I started during study as pc-admin for DOS, Windows, WfW and all related software and hardware stuff. Later I switched over to servers, starting with linux-samba and NT 3.5/4.0. My first job made me a Solaris admin in a huge company with over 500 solaris servers. There I got every day a new interesting problem that I have never encountered before. My next job brought me into project management and later back to system administration - mainly Linux. It was frustrating to manage a project when you knew that doing the admin`s job yourselv would have the current step finished in less than 30 minutes...

Updated on September 18, 2022

Comments

  • Nils
    Nils over 1 year

    RedHat and CentOS are binary compatible. So everything that works on the one will most probably work on the other (same RPMs, same libs, same versions, same dependencies)...

    Does the same hold true when comparing Ubuntu LTS with Debian? When trying to build up a mirror for Ubuntu LTS I noticed that the packages were coming from a Debian repository...

    Will everything work the same in the same sense it does with RH/CO, or is this a day/night difference (like OpenSuSE compared with SLES)?

    • Alen Milakovic
      Alen Milakovic over 10 years
      I don't think you can reply on binary compatability. However, versions of Debian and Ubuntu which were released at around the same time are usually more or less source level compatible. I occasionally recompile Ubuntu sources on Debian when the package is not available for Debian, and usually it works fine.
    • Nils
      Nils over 10 years
      @FaheemMitha That is pretty the same as the accepted answer. Propably the sources are the same, but the compile-options are propably not ("everything that transforms a Debian into an Ubuntu distribution").
  • Nils
    Nils almost 12 years
    I did not ask on "Ask Ubuntu" as I suspect they do not like Debian that much...
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' almost 12 years
    Welcome to Stack Exchange. This is a questions and answers site. Your post is just barely an answer, it mostly goes of on a tangent and is somewhat aggressive. Paragraph 1: true, and relevant, but does not answer the question on its own. Paragraph 2: strongly misleading. Paragraphs 3 and 4: an unrelated rant. If you explained why “the answer is no”, this would be an actual answer (and if you qualified it, like bahamat did, it could be a good answer — drop the anti-Ubuntu rant).
  • Nils
    Nils almost 12 years
    This goes into the direction "Ubuntu is meant for Clients". An interesting aspect of your answer is stability. Would you classify Debian as rock-solid and secure, while Ubuntu has the newest features built in to make Laptop-users happy?
  • Nils
    Nils almost 12 years
    @Gilles - I draw very much information from this answer to my question. Although this is clearly from a pro-Debian user, it reflects some common opinions I already heard of.
  • Nils
    Nils almost 12 years
    Can you explain the ABI-differences in more detail? My assumption was that they are just different distributions, based on different versions, but basically the same source-code for these versions (e.g. for a wget-package).
  • Nils
    Nils almost 12 years
    Here I found a imho neutral WiKi that specializes on comparisons. So your main point is true - the same conclusions that you drew can be found in many places in the internet.
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' almost 12 years
    @Nils I caution you from putting too much stock in this answer. By the way, I run Debian on my home desktop computer, and I administer several Ubuntu servers.
  • sunnysideup
    sunnysideup almost 12 years
    @Nils ABI-difference is not about the source code but about the architecture - e.g stackoverflow.com/questions/3784389/… this is mainly a problem for kernel modules but if ubuntu or debian decides to switch to the x32 arch this would mean that programs can not be used on the other distribution.
  • sunnysideup
    sunnysideup almost 12 years
    @nils stackoverflow.com/questions/2801938/gcc-abi-compatibility there were problems re. abi compatibility between different gcc versions but it seems this is solved. But for c++ there is no standardized name mangling though some compilers produce the same names - en.wikipedia.org/wiki/…
  • Nils
    Nils almost 12 years
    @Gilles So I look forward to your own answer to this question. Ubuntu Server and Debian Desktop is unusual - from what I`ve seen so far about the differences.
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' almost 12 years
    @Nils Why would I answer this question? bahamat has already provided a good answer.