I wrote a small "Hello world" program which runs on my linux computer with Intel CPU, but on a Linux server of a friend it shows this error message:
root@HelmiNAS:/opt# ./test32
-ash: ./test32: cannot execute binary file: Exec format error
root@HelmiNAS:/opt# ./test64
-ash: ./test64: cannot execute binary file: Exec format error
(I compiled the program both as 32- and 64-bit because we are unsure which would be right).
Can it be that we use the wrong CPU-family?
The friend assumes that he has an ARM-CPU, but "uname -a" shows "aarch64":
root@HelmiNAS:/opt# uname -a
Linux HelmiNAS 4.4.180+ #42962 SMP Sat Apr 8 00:12:20 CST 2023 aarch64 GNU/Linux rtd1296
With which linux command can we find out, which is definitely the correct CPU-family to install the correct cross-compiler (arm or aarch64) and whether we need to compile as 64-bit or 32-bit? We are both beginners on Linux.
Thanks in advance.