Linux distribution binary compatibility

前端 未结 10 1231
日久生厌
日久生厌 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:47

    I realize this is a very old question, but it comes up high in search results and this hasn't been mentioned:

    CDE is a tool to create portable Linux applications. This tool packages together all needed files (including libraries) by analyzing at run-time. I have used it successfully on command-line tools several times, one example being getting tcpdump to run on a old hardware appliance running a custom distribution. CDE also doesn't require source, it just packages an executable you are able to run.

    At one point I had an error running the cde command which was fixed by prepending the command with LD_ASSUME_KERNEL=2.4.1, this might not be necessary in recent versions as it was years back.

    Code is also on GitHub: https://github.com/pgbovine/CDE

提交回复
热议问题