CentOS: cannot execute binary file compiled on Mac OS X
<p>I created a test app in C as follows:</p>

<pre><code>#include&lt;stdio.h&gt;
int main(void){
    printf("Hello World!\n");
    return 0;
}
</code></pre>

<p>I compile via the following command on my MacBook Air, running OS X Yosemite:</p>

<pre><code>$ cc foo.c -o foo
</code></pre>

<p>I then upload the "foo" binary to my CentOS VPS, CHMOD 755, then attempt to execute via the following command:</p>

<pre><code>$ ./foo
</code></pre>

<p>This returns the following result:</p>

<pre><code>-bash: ./foo: cannot execute binary file
</code></pre>

<p>I also attempted to compile with -m32 in case it was a 64/32 bit conflict.  The same result was produced.</p>

<p>Why will CentOS will not execute the binary?</p>