Linux distribution binary compatibility

前端 未结 10 1230
日久生厌
日久生厌 2021-01-30 14:23

Any way to make a binary in a Linux distribution and run it on another distribution with same architecture? Or I should compile and build it on different distributions?

10条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-30 14:52

    Statically linking your binaries makes them LESS portable because some libraries won't then work correctly for that machine (differing authentication methods, etc).

    If you statically link any "unusual" libraries and keep your set of supported distros to a minimum, you should be ok.

    Don't statically link the C library (or the whole binary), that's a recipe for trouble :)

    Look at what (e.g.) Google do with Chrome.

提交回复
热议问题