I need to compile and run binaries on CentOS 7 but I'm having hard time running my wrapper app due to Python versions and other issues. If I compile and test binaries on Ubuntu (or any other distribution) and then move my binaries to an online CentOS 7 would I run into any binaries-platform problem?

PS: Binaries I am running are of Google's cwebp and ImageMagick. My wrapper is a Node function for AWS Lambda.


Short answer is that binaries from one system are not guaranteed to run correctly on another system, but they may work. They may also appear to work, but have issues.

Longer answer is that it depends on how those binaries were linked. Statically linked binaries have a better chance of running than dynamically linked binaries. Dynamically linked binaries will have a lot of dependencies that may not be satisfiable by a different distribution.

In your particular case, your best bet is to create a CentOS 7 virtual machine or container and create the binaries there. If you can, generate statically linked binaries, then deploy those to your restricted production system.

  • Thanks for the answer. There seem to be no short way. I'm doing what you said: compiling on CentOS without testing (I can't test without my wrapper) and then moving the binaries to my host. I hope it works! – Lee Moe Jan 4 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.