0

I want to run a program called CRX2RNX which decompresses GNSS data (Hatanaka compression). However, when I run the executable I get the error:

bash: CRX2RNX: cannot execute binary file: Exec format error

I've downloaded the .tar.gz files for Linux (32bit) on this website: https://terras.gsi.go.jp/ja/crx2rnx.html.

I extracted the tar.gz file with tar -xf nameoffile.tar.gz

Is it possible to run such an executable on a Raspberry? On another Ubuntu server this works perfectly fine.

  • 2
    Welcome to this site! The linux binaries on the linked page say »linux_x86«, but the Raspi has an ARM processor, not x86 (Intel architecture). You'll probably need to compile it yourself, either on the Raspi or (using a cross compiler) on your PC. – Philippos Jun 15 '23 at 15:46
  • Thank you Philippos, Can you point me in the right direction regarding this compiling? Is it possible to "convert" the x86 binaries to ARM with my windows PC? – seanzand Jun 15 '23 at 16:36
  • 1
    Download RNXCMP_4.1.0_src.tar.gz, unpack it, and find compilation instructions in the file `RNXCMP_4.1.0_src/docs/RNXCMP.txt`. It looks pretty easy: A single command without fancy libraries, compilation or linking options. I don't think that there is a binary converter; you may be able to use an emulator like qemu to run the x86 binary; see also https://unix.stackexchange.com/questions/577953/is-it-possible-to-run-x86-executable-on-arm. That would be overkill in my opinion. My recommendation: Compile it. – berndbausch Jun 16 '23 at 01:10
  • 1
    And in this case I recommend to compile on the Raspi: Install the GNU toolchain and do a native build (crosscompiling can be tricky if the software creators did not think straight). – Philippos Jun 16 '23 at 06:55
  • The code looks short. I would definitely not play around with cross-compiling. In other words, strong support for Philippos' second remark. – berndbausch Jun 16 '23 at 08:01
  • Thank you guys! I should've read the docs a bit better :) The solution bernd suggested worked perfectly. So I compiled it using gcc on the RPi – seanzand Jun 16 '23 at 08:56

0 Answers0