简体   繁体   中英

How to know if a program can run in Linux / Mac

Is there any tool to check the supported platforms of a program? Or the only option is to check every library used compatibility?

You can use the file command to assess the platform compatibility of any program binary object. Ex:

MacOS % file macos/rawtherapee
macos/rawtherapee: Mach-O 64-bit executable arm64

Linux % file linux/rawtherapee 
linux/rawtherapee : ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=274e4d07246167973ceda1296c8961e088b65e9d, for GNU/Linux 3.2.0, with debug_info, not stripped

ELF is for linux, Mach-O is for Mac.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM