为什么有的程序在linux不需要编译就可以直接使用?
天蓬老师
天蓬老师 2017-04-17 14:45:36
0
6
556

为什么有的程序不需要编译就直接可以在linux使用?比如mongodb,是这些程序已经做好了编译了供你直接使用的吗?那么他是怎么做到系统之间不同版本兼容的?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(6)
左手右手慢动作

Programs written in scripting language can be compiled and executed on-site according to the interpreter.
Others are compiled, which simply saves the user’s compilation time. For example, the rar official website provides downloads of compiled unrar binary files.

So how does he achieve compatibility between different versions of the system?
The answer is, they are not compatible! Binary files compiled by the i386 instruction set cannot be run on an ARM machine. Even if they are compiled on arm, each instruction set is incompatible and cannot be used. For example, there are many versions of the arm version binary file on the rar official website, and it seems that none of them can run directly on Xiaomi routers.

Peter_Zhu

Provide different binary versions for different platforms in advance for users to download, ready to use out of the box

迷茫

Yes, redis is similar.
If there is no special choice (32/64), (linux/windows)
It is compatible

阿神

Binary file, you can run it directly

巴扎黑

The mongodb you mentioned is compiled. You can see the download links for different platforms on the mongo official website. They are compiled for different platforms in advance. Of course, you can also download the source code and compile it yourself

迷茫

If it is not specifically mongodb, it may also be because of java

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template