Hello,
It looks like you are trying to install mac binaries on a linux platform, which leads to the "exec format" errors.
And since the install is going under /usr/local/abin, that is where afni AFNI.afnirc would be copied out of.
It seems likely that you would want the linux_centos_7_64 package (rather than macos_10.12_local), but let's verify that.
What is the output of:
cat /etc/os-release
To provide more information, you could post the output from:
afni_system_check.py -check_all
Thanks,
- rick