# Building balenaOs Image for raspberry pi 4 failed

**URL:** <https://forums.balena.io/t/building-balenaos-image-for-raspberry-pi-4-failed/295681>\
**Category:** balenaOS\
**Tags:** raspberrypi4\
**Created:** [April 17, 2021, 6:34am UTC](https://forums.balena.io/t/building-balenaos-image-for-raspberry-pi-4-failed/295681 "2021-04-17T06:34:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![codingecho](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@codingecho](https://forums.balena.io/u/codingecho)\
**Post date:** [April 17, 2021, 6:34am UTC](https://forums.balena.io/t/building-balenaos-image-for-raspberry-pi-4-failed/295681/1 "2021-04-17T06:34:07Z")

</div>

Hi,

i’m trying to build an balenaOS image for raspberry pi 4 and it fails. I’m using ubuntu 18.04

git clone --recursive [https://github.com/balena-os/balena-raspberrypi.git](https://github.com/balena-os/balena-raspberrypi.git)

./balena-yocto-scripts/build/barys

Log file : [cl1p.net - The internet clipboard](https://cl1p.net/uqzdsujpmdgke)

Should I build on another operating system than ubuntu 18.04?

---

<div class="post-metadata">

**Author:** ![klutchell](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/klutchell/32/861_2.png) [@klutchell](https://forums.balena.io/u/klutchell)\
**Post date:** [April 20, 2021, 4:06pm UTC](https://forums.balena.io/t/building-balenaos-image-for-raspberry-pi-4-failed/295681/8 "2021-04-20T16:06:13Z")

</div>

Hey @codingecho, a number of us are using Ubuntu 18.04 for building and haven’t experienced these errors. Have you tried a fresh checkout in a clean workspace, or in a new Ubuntu virtual machine?

There are also non-official docker containers to build balenaOS in Docker, like [GitHub - alexgg/docker-balena: A balena OS docker image builder](https://github.com/alexgg/docker-balena). It’s not well documented as we are planning to improve the build process with containers in future releases of balenaOS.

---

<div class="post-metadata">

**Author:** ![codingecho](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@codingecho](https://forums.balena.io/u/codingecho)\
**Post date:** [April 21, 2021, 4:42am UTC](https://forums.balena.io/t/building-balenaos-image-for-raspberry-pi-4-failed/295681/10 "2021-04-21T04:42:29Z")

</div>

Thanks it worked fine whit clean workspace.
