Apt-get can't find packages on Yocto Build


I’ve built my own Linux image using the “Build a Reference Image with Yocto Project/OpenEmbedded” guide.
I added apt as a package using the provided recipe as explained in the guide and the webinar on that page, and I manage to install it on my Colibri imx6ull using the Easy Installer. However, now when I try to use apt-get it cannot find any packages. The /etc/apt/source.list file doesn’t exist and when I run apt-get update and upgrade nothing happens.

Does anyone know how to solve this?

Best regards,

Hello @pontusoim,

Starting with BSP 3.0, we dropped the Ångström Distribution in favor of a Poky based distribution. For BSP 3.0 and newer-based images, you cannot install packages from an online feed, only packages you build, as stated here: Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center

However, if you switch to TorizonCore, you can use a container that makes it possible to use Debian feeds.

If you need to build a Yocto image and don’t want to use TorizonCore though, you need to add your packages into your “local.conf” file, so they will be downloaded and installed during your bitbake process.

Let me know if you need anything else.

Best regards,

Okay. But I have a Colibri imx6ull which does not support TorizonCore. That’s why i Build my own image through that guide. And I built apt and added it to the local conf just like you said. And apt-get works on my image but it cannot find any packages. Is there a package list somewhere that I need to download or something like that?
Best regards,

Hi @pontusoim,

You should install all your packages through Yocto using the local.conf file instead of installing APT and trying to install packages inside your image through APT.

The APT package manager will try to install Debian packages that must be compatible with your hardware architecture in order for this to work. You cannot find any packages because there is no Debian repo for imx6 and we do not support that. Unfortunately, the only supported way to do it is through Yocto.

I made a quick search here and apparently Raspberry Pi 2 uses the Cortex-A7 microprocessor (which is the same for your Colibri). So maybe if you configure your APT to get Raspberry Pi 2 packages with the right architecture, it can in theory work. But please be aware that this type of customization is not supported and APT might download some packages that could not work properly.

Again, I recommend you go with Yocto in this case. Can you share which packages are you trying to use? So then I can help you with your image.

Best regards,

Okay. I need to install a bunch of packages. The easiest way would be to install docker and then build a docker container, but I don’t think docker suppports 32-bit architectures?

So there are some packages that I found as recipes with the “bitbake-layers show-recipes | less” command. But there is also several packages I cannot find there and then I don’t know how to proceed.
These are the packages I cannot find:

And I’m not done with the development so there might be more things I need as well. But if there is a long build process every time I need to install and test if I can use a package then the development time will increase a lot.

Do you have any suggestions?


Hi @pontusoim,

Yes, there is docker support for armv7 architecture. You indeed could do that also, using the “meta-virtualization” layer for Yocto and adding “docker-ce” to your image. But maybe you could run into some issues with services that docker uses with systemctl. And also we don’t support this approach, we only support docker with Torizon.

In order for these packages to work, you should add the following line at the end of your local.conf file:

IMAGE_INSTALL_append = " python3-dev libgpiod alsa-oss zlib1g-dev g++ alsa-server alsa-conf libatopology alsa-lib"

I don’t know exactly if this is all that you need, you should check for all your dependencies in layers.openembedded.org. There you can search for layers and recipes that you need.
Also, I couldn’t find exactly these sound packages that you mentioned (maybe they are Debian specific?), so I just add alsa package to your recipe.
Then, please, you’ll need to try first this image first to check if your software will work with those packages.

Plus, note that with bitbake-layers show-recipes you won’t be able to find all packages that you need because sometimes you need extra yocto layers and sometimes these packages are inside layer recipes. That’s why you couldn’t find python3-dev with this command, actually this package is inside the recipe for python.

Finally, yes, this is how Yocto works, unfortunately. But there is a good thing about Yocto: all your work is saved and all layers are cached when you bake an image, so indeed the first time will take a long time to finish your image, but then any modification that you make will actually take less time to complete.

I hope this makes things clear for you.

Best regards,