Mender-artifact: cannot execute binary file : Exec format error

Can anyone tell the reason behind it, I have followed the instructions from the directory Update Module.(https://hub.


mender.io/t/directory/325)

Hello @Nikita_nagar62,

That is because the mender-artifact binary is provided for x86. Running it on an ARM machine (which the RasPi is) does not work, so you either have to generate the artifact on your development machine or build mender-artifact locally from source, e.g. compile it on the RasPi.

Greetz,
Josef

Can you please elaborate it? How can I generate artifact or mender-artifact locally @TheYoctoJester

Hi @Nikita_nagar62,

You can create artifacts locally by running mender-artifact, that is correct in the approach. The problem you are facing is that the mender-artifact tool (as a binary) is provided for the x86 architecture, so you need to use it on a x86 machine, which usually is your development host or laptop.

If you want to use it in-target, e.g. on the Raspberry Pi or such, then you have to get the sources from its repository and follow the instructions to compile it. Then you can use it on a non-x86 platform also.

Greetz,
Josef

1 Like