Is there any difference between executable binary files between distributions?

后端 未结 5 1137
甜味超标
甜味超标 2021-02-08 11:23

As all Linux distributions use the same kernel, is there any difference between their executable binary files?

If yes, what are the main differences? Or does that mean w

5条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-08 12:11

    If you want to create a program that runs an all Linux distributions, you can consider using scripting languages (like Python and Perl) or a platform independent programming language like Java.

    Programs written in scripting languages are complied at execution time, which means they are always compiled to match the platform they are executed on, and, hence, should always work (given that the libraries are set up properly).

    Programs written in Java, on the other hand, are compiled before distributing them, but can be executed on any Linux distribution as long as it has a Java VM installed.

    Furthermore, programs written in Java can be run on other operating systems like MS Windows and Mac OS.

    The same is true for many programs written in Python and Perl; however, whether a Python or Perl program will work on another operating system depends on what libraries are used by that program and whether these libraries are available on the other operating systems.

提交回复
热议问题