2

I have a application that gives the error:

nhsupsserver: cannot execute binary file

I read some texts and the most speak about an architecture mismatch and executable file.

The line that references the error is

do_start() {
  $NHSUPSSERVER -d
}

I tried with a 32 and 64 bit executable but the same thing happened

cubietruck:/usr/local/nhs# file nhsupsserver64
nhsupsserver64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID[sha1]=0x90896f88ce3ae94d53190615abf4f2075ee1b18d, not stripped
cubietruck:/usr/local/nhs# file nhsupsserver32
nhsupsserver32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID[sha1]=0x5a63e079574fae633eb538a4400f5e6f6e224752, not stripped
cubietruck:/usr/local/nhs# uname -a
Linux cubietruck 3.4.61+ #1 SMP PREEMPT Tue Dec 17 19:28:39 CST 2013 armv7l armv7l armv7l GNU/Linux

What is going on?

  • 1
    Your shell (and presumably the whole system) uses an ARM processor; it's possible the executable is for a different 32-bit architecture. Try running 'file $NHSUPSSERVER'; if it says something other than ARM (most likely i386, but there are other possibilities), then you need to get a version for 32-bit ARM. – j_foster Aug 8 '15 at 14:21
4

Run uname -a and also file nhsupserver. Quite possible that you are running ARM architecture but the nhsupserver binary is for x86.

UPDATE now you've added both these outputs it is clear that your hardware is armv7l but the nhsupserver binary is compiled for x86 hardware.

You need to obtain a version of nhsupserver which has been compiled for your armv7l hardware. This could involve downloading a different package or compiling it from source. Or abandoning your armv7l hardware and going x86.

  • 2
    More than "possible": 32-bit binary: "ELF 32-bit LSB executable, Intel 80386", uname -a output: "armv7l armv7l armv7l" – Andrew Henle Aug 8 '15 at 15:42

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.