# Problem building PYNQ SD image for ZC706

**URL:** <https://discuss.pynq.io/t/problem-building-pynq-sd-image-for-zc706/627>\
**Category:** Support\
**Created:** [November 1, 2019, 2:36am UTC](https://discuss.pynq.io/t/problem-building-pynq-sd-image-for-zc706/627 "2019-11-01T02:36:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![JTC](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@JTC](https://discuss.pynq.io/u/JTC)\
**Post date:** [November 1, 2019, 2:36am UTC](https://discuss.pynq.io/t/problem-building-pynq-sd-image-for-zc706/627/1 "2019-11-01T02:36:09Z")

</div>

I am using an Ubuntu 18.04.3 LTS VM with Vivado 2019.1 and PetaLinux 2019.1, and I’m trying to build PYNQ 2.5 for the ZC706. It gets all the way to the point where the create\_rootfs.sh script is trying to run multistrap, and I get this:

W: GPG error: [Index of /ubuntu-ports](http://ports.ubuntu.com/ubuntu-ports) bionic InRelease: The following signatures couldn’t be verified because the public key is not available: NO\_PUBKEY 3B4FE6ACC0B21F32

followed by an error message saying the repository isn’t signed and can’t be updated from securely. I tried adding this key with “sudo apt-key adv …”, and I also tried editing the script and multistrap config file as suggested in this thread:

> [@PYNQ SD Image for Ultra96: error in GPG key for apt](https://discuss.pynq.io/t/pynq-sd-image-for-ultra96-error-in-gpg-key-for-apt/101):
>
> When I try to build an image for Ultra96 board, I get the following error. Get:1 http ://ports.ubuntu.com/ubuntu-ports bionic InRelease [242 kB] Err:1 http ://ports.ubuntu.com/ubuntu-ports bionic InRelease The following signatures couldn’t be verified because the public key is not available: NO\_PUBKEY 3B4FE6ACC0B21F32 Reading package lists… Done W: GPG error: [Index of /ubuntu-ports](http://ports.ubuntu.com/ubuntu-ports) bionic InRelease: The following signatures couldn’t be verified because the public key is not available: NO\_PU…

Neither of these fixes worked for me. Any suggestions would be greatly appreciated…

---

<div class="post-metadata">

**Author:** ![gnatale](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gnatale/32/11_2.png) [@gnatale](https://discuss.pynq.io/u/gnatale)\
**Post date:** [November 1, 2019, 10:52am UTC](https://discuss.pynq.io/t/problem-building-pynq-sd-image-for-zc706/627/2 "2019-11-01T10:52:18Z")

</div>

The error kind of speaks for itself, there’s a missing key.

Please try again adding the key, as documented [here](https://chrisjean.com/fix-apt-get-update-the-following-signatures-couldnt-be-verified-because-the-public-key-is-not-available/) and see how far you can get.

Please, as you try again, report out the exact steps you performed so we can understand a little more what is going on.

---

<div class="post-metadata">

**Author:** ![JTC](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@JTC](https://discuss.pynq.io/u/JTC)\
**Post date:** [November 1, 2019, 12:11pm UTC](https://discuss.pynq.io/t/problem-building-pynq-sd-image-for-zc706/627/3 "2019-11-01T12:11:28Z")

</div>

As I mentioned in my post, I did add the key. This is the command I used:

sudo apt-key adv --keyserver [keyserver.ubuntu.com](http://keyserver.ubuntu.com) --recv-keys 3B4FE6ACC0B21F32

which is the same as what is in the link you sent. I had this command line in my original post, but the website wouldn’t let me post it. It saw “[keyserver.ubuntu.com](http://keyserver.ubuntu.com)” as a link and said I was trying to post too many links as a new user…

---

<div class="post-metadata">

**Author:** ![gnatale](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gnatale/32/11_2.png) [@gnatale](https://discuss.pynq.io/u/gnatale)\
**Post date:** [November 1, 2019, 1:15pm UTC](https://discuss.pynq.io/t/problem-building-pynq-sd-image-for-zc706/627/4 "2019-11-01T13:15:45Z")

</div>

Understood.  
One thing you might try is to avoid this step altogether when building for your board.  
The way you do it is by passing our pre-built rootfs.  
You can download it [here](http://www.pynq.io/board.html), under “other boards”. For the aarch64 architecture is [this](http://bit.ly/2IwiiWO) image.  
Once downloaded, you can pass the PREBUILT arg to the make command, like this:  
`make PREBUILT=<full-path-to-rootfs-img> ...`  
This will avoid the step where you are having troubles, and in the end, will also be tremendously faster.  
Besides, this is also the reccommended/supported way of building images for other boards. You should avoid rebuilding the rootfs yourself unless you strictly need it because you made modifications to it (which I assume is not your case).

I am sorry I can’t be of more help

---

<div class="post-metadata">

**Author:** ![JTC](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@JTC](https://discuss.pynq.io/u/JTC)\
**Post date:** [November 2, 2019, 3:07am UTC](https://discuss.pynq.io/t/problem-building-pynq-sd-image-for-zc706/627/5 "2019-11-02T03:07:35Z")

</div>

Using the prebuilt rootfs got me over this hurdle. Thanks for the help!

I was following the instructions [here](https://pynq.readthedocs.io/en/latest/pynq_sd_card.html#pynq-sd-card), which do not mention the PREBUILT arg.

---

<div class="post-metadata">

**Author:** ![gnatale](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gnatale/32/11_2.png) [@gnatale](https://discuss.pynq.io/u/gnatale)\
**Post date:** [November 4, 2019, 11:34am UTC](https://discuss.pynq.io/t/problem-building-pynq-sd-image-for-zc706/627/6 "2019-11-04T11:34:00Z")

</div>

You are right, it’s not really documented. Thanks for the feedback! And glad I was able to help!

---

<div class="post-metadata">

**Author:** ![gnatale](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gnatale/32/11_2.png) [@gnatale](https://discuss.pynq.io/u/gnatale)\
**Post date:** [December 11, 2019, 10:38am UTC](https://discuss.pynq.io/t/problem-building-pynq-sd-image-for-zc706/627/7 "2019-12-11T10:38:08Z")

</div>

Hi @JTC, I just wanted to give you an heads up on this matter. We took your feedback and updated the documentation, along with other build flow improvements, with this pull request [sdbuild flow improvements by giunatale · Pull Request #975 · Xilinx/PYNQ · GitHub](https://github.com/Xilinx/PYNQ/pull/975)

The readthedocs change is not yet visible on the website, but it will be up in the next docs update.  
Again, many thanks for providing feedback, we truly appreciate the help from the community!

---

<div class="post-metadata">

**Author:** ![neocsc](https://avatars.discourse-cdn.com/v4/letter/n/898d66/32.png) [@neocsc](https://discuss.pynq.io/u/neocsc)\
**Post date:** [March 13, 2020, 2:39pm UTC](https://discuss.pynq.io/t/problem-building-pynq-sd-image-for-zc706/627/8 "2020-03-13T14:39:03Z")

</div>

Hi @gnatale,  
I am facing the same problem.  
After using **make PREBUILT= …** I am still getting the error

**W: GPG error: [Index of /ubuntu-ports](http://ports.ubuntu.com/ubuntu-ports) bionic InRelease: The following signatures couldn’t be verified because the public key is not available: NO\_PUBKEY 3B4FE6ACC0B21F32**

The image is generated by a message failed to generate image.img is displayed.  
I am just trying to rebuild PYNQ-Z2 and after I would try to retarget to a Zybo Z7-20.

Could you please help?  
Thank you

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [March 13, 2020, 4:06pm UTC](https://discuss.pynq.io/t/problem-building-pynq-sd-image-for-zc706/627/9 "2020-03-13T16:06:20Z")

</div>

Hi, please ask questions in one thread - it will be checked and answered.

---

<div class="post-metadata">

**Author:** ![neocsc](https://avatars.discourse-cdn.com/v4/letter/n/898d66/32.png) [@neocsc](https://discuss.pynq.io/u/neocsc)\
**Post date:** [March 13, 2020, 4:38pm UTC](https://discuss.pynq.io/t/problem-building-pynq-sd-image-for-zc706/627/10 "2020-03-13T16:38:48Z")

</div>

Sorry @rock, I will follow the other thread.
