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

**URL:** <https://hub.mender.io/t/mender-artifact-cannot-execute-binary-file-exec-format-error/5608>\
**Category:** General Discussions\
**Created:** [February 8, 2023, 10:24am UTC](https://hub.mender.io/t/mender-artifact-cannot-execute-binary-file-exec-format-error/5608 "2023-02-08T10:24:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikita\_nagar62](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@Nikita\_nagar62](https://hub.mender.io/u/Nikita_nagar62)\
**Post date:** [February 8, 2023, 10:24am UTC](https://hub.mender.io/t/mender-artifact-cannot-execute-binary-file-exec-format-error/5608/1 "2023-02-08T10:24:57Z")

</div>

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

 ![IMG_20230208_152444](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/5/54d8d6e69b3b45bc162395671256cf18c97ad86a.jpeg)  
[mender.io/t/directory/325](http://mender.io/t/directory/325))

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [February 8, 2023, 8:55pm UTC](https://hub.mender.io/t/mender-artifact-cannot-execute-binary-file-exec-format-error/5608/2 "2023-02-08T20:55:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nikita\_nagar62](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@Nikita\_nagar62](https://hub.mender.io/u/Nikita_nagar62)\
**Post date:** [February 9, 2023, 1:07am UTC](https://hub.mender.io/t/mender-artifact-cannot-execute-binary-file-exec-format-error/5608/3 "2023-02-09T01:07:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [February 16, 2023, 11:03am UTC](https://hub.mender.io/t/mender-artifact-cannot-execute-binary-file-exec-format-error/5608/4 "2023-02-16T11:03:36Z")

</div>

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](https://github.com/mendersoftware/mender-artifact) and follow the instructions to compile it. Then you can use it on a non-x86 platform also.

Greetz,  
Josef
