# Issue with generating artifact when using Raspbian Images

**URL:** <https://hub.mender.io/t/issue-with-generating-artifact-when-using-raspbian-images/1241>\
**Category:** General Discussions\
**Created:** [November 12, 2019, 8:38pm UTC](https://hub.mender.io/t/issue-with-generating-artifact-when-using-raspbian-images/1241 "2019-11-12T20:38:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Will84](https://avatars.discourse-cdn.com/v4/letter/w/53a042/32.png) [@Will84](https://hub.mender.io/u/Will84)\
**Post date:** [November 12, 2019, 8:38pm UTC](https://hub.mender.io/t/issue-with-generating-artifact-when-using-raspbian-images/1241/1 "2019-11-12T20:38:13Z")

</div>

Hi, I have followed this method using the exact build referenced in this method, attempting to create a new artefact - so far i am unable to create the artifact successfully.

I have made the required files executable, but cant figure out what is going wrong at this stage;

```auto
ARTIFACT_NAME="my-update-1.0"
DEVICE_TYPE="raspberrypi3"
OUTPUT_PATH="my-update-1.0.mender"
SRC_DIR="dir-to-deploy"
DEST_DIR="/opt/installed-by-mender/"

./directory-artifact-gen -n ${ARTIFACT_NAME} -t ${DEVICE_TYPE} -d ${DEST_DIR} -o ${OUTPUT_PATH} ${SRC_DIR}

```

In my system, i am seeing the following;  
cdx@cdx-VirtualBox:~/Desktop/Mender\_Trials$ ./directory-artifact-gen -n {ARTIFACT\_NAME} -t {DEVICE\_TYPE} -d {DEST\_DIR} -o {OUTPUT\_PATH} ${SRC\_DIR}

./directory-artifact-gen: line 32: hash: mender-artifact: not found

I attempted this on a new installation of Ubuntu 18.04.03

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![eystein](https://avatars.discourse-cdn.com/v4/letter/e/e5b9ba/32.png) [@eystein](https://hub.mender.io/u/eystein)\
**Post date:** [November 12, 2019, 9:39pm UTC](https://hub.mender.io/t/issue-with-generating-artifact-when-using-raspbian-images/1241/2 "2019-11-12T21:39:01Z")

</div>

Hi @Will84 and welcome to the Mender community!

The error indicates that directory-artifact-gen does not find mender-artifact.  
Is directory-artifact-gen and mender-artifact in the same directory? If not, could you copy in the mender-artifact binary into the same directory where you are running directory-artifact-gen?

I have updated the instructions to also copy mender-artifact into a system directory in “Configure your Mender server”, and with this the binaries should not need to be in the same directory.

Let us know how this works out.

---

<div class="post-metadata">

**Author:** ![Will84](https://avatars.discourse-cdn.com/v4/letter/w/53a042/32.png) [@Will84](https://hub.mender.io/u/Will84)\
**Post date:** [November 12, 2019, 10:12pm UTC](https://hub.mender.io/t/issue-with-generating-artifact-when-using-raspbian-images/1241/3 "2019-11-12T22:12:40Z")

</div>

Hi @eystein - thanks for the quick response.

directory-artifact-gen and mender-artifact were in the same directory during my previous attempts.

Thank you for the updated method, copying the mender-artifact into the system folder has resolved my problem, i can now successfully generate an artifact.

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![eystein](https://avatars.discourse-cdn.com/v4/letter/e/e5b9ba/32.png) [@eystein](https://hub.mender.io/u/eystein)\
**Post date:** [November 12, 2019, 10:24pm UTC](https://hub.mender.io/t/issue-with-generating-artifact-when-using-raspbian-images/1241/4 "2019-11-12T22:24:38Z")

</div>

Awesome! Please don’t hesitate to ask if there’s anything else that is not working or seems a bit confusing!
