Docker buildbot fails "opkg_install_cmd: cannotinstall package"

Hello,

I am trying to build a custom image. I literally just built it yesterday, but today it is complaining about failing to install nearly every package, including uci!

buildbot@bad47c3cad65:~$ make image PROFILE=friendlyarm_nanopi-r5s ROOTFS_PARTSIZE="1040"
Building images for rockchip - FriendlyARM NanoPi R5S
Packages: base-files busybox ca-bundle dnsmasq dropbear e2fsprogs firewall4 fstools kernel kmod-gpio-button-hotplug kmod-nft-offload kmod-r8169 libc libgcc libustream-mbedtls logd mkf2fs mtd netifd nftables odhcp6c odhcpd-ipv6only opkg partx-utils ppp ppp-mod-pppoe procd procd-seccomp procd-ujail uboot-envtools uci uclient-fetch urandom-seed urngd       

Package list missing or not up-to-date, generating it.

Building package index...
Downloading https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/packages/Packages.gz
Updated list of available packages in /builder/build_dir/target-aarch64_generic_musl/root-rockchip/../../../../builder/dl/openwrt_core
Downloading https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_generic/base/Packages.gz
Updated list of available packages in /builder/build_dir/target-aarch64_generic_musl/root-rockchip/../../../../builder/dl/openwrt_base
Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_generic/base/Packages.sig
Signature check failed.
Remove wrong Signature file.
Downloading https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/kmods/6.6.35-1-55cf8ed2fa13e55df2994f7c759bc728/Packages.gz
Updated list of available packages in /builder/build_dir/target-aarch64_generic_musl/root-rockchip/../../../../builder/dl/openwrt_kmods
Downloading https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/kmods/6.6.35-1-55cf8ed2fa13e55df2994f7c759bc728/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_generic/luci/Packages.gz
Updated list of available packages in /builder/build_dir/target-aarch64_generic_musl/root-rockchip/../../../../builder/dl/openwrt_luci
Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_generic/luci/Packages.sig
Signature check failed.
Remove wrong Signature file.
Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_generic/packages/Packages.gz
Updated list of available packages in /builder/build_dir/target-aarch64_generic_musl/root-rockchip/../../../../builder/dl/openwrt_packages
Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_generic/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_generic/routing/Packages.gz
Updated list of available packages in /builder/build_dir/target-aarch64_generic_musl/root-rockchip/../../../../builder/dl/openwrt_routing
Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_generic/routing/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_generic/telephony/Packages.gz
Updated list of available packages in /builder/build_dir/target-aarch64_generic_musl/root-rockchip/../../../../builder/dl/openwrt_telephony
Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_generic/telephony/Packages.sig
Signature check passed.
Downloading file:packages/Packages
Updated list of available packages in /builder/build_dir/target-aarch64_generic_musl/root-rockchip/../../../../builder/dl/imagebuilder
Downloading file:packages/Packages.sig
Signature check passed.

Installing packages...
Installing libc (1.2.5-r4) to root...
Installing libgcc1 (13.3.0-r4) to root...
Copying /builder/dl/libgcc1_13.3.0-r4_aarch64_generic.ipk.
Configuring libgcc1.
Configuring libc.
Installing kernel (6.6.35~55cf8ed2fa13e55df2994f7c759bc728-r1) to root...
Configuring kernel.
Unknown package 'base-files'.
Unknown package 'busybox'.
Unknown package 'ca-bundle'.
Unknown package 'dnsmasq'.
Installing dropbear (2024.85-r1) to root...
Copying /builder/dl/dropbear_2024.85-r1_aarch64_generic.ipk.
Unknown package 'e2fsprogs'.
Unknown package 'firewall4'.
Installing fstools (2024.01.22~08cd7083-r1) to root...
Copying /builder/dl/fstools_2024.01.22~08cd7083-r1_aarch64_generic.ipk.
Package kernel (6.6.35~55cf8ed2fa13e55df2994f7c759bc728-r1) installed in root is up to date.
Installing kmod-gpio-button-hotplug (6.6.35-r3) to root...
Copying /builder/dl/kmod-gpio-button-hotplug_6.6.35-r3_aarch64_generic.ipk.
Installing kmod-nft-offload (6.6.35-r1) to root...
Copying /builder/dl/kmod-nft-offload_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-nf-conntrack (6.6.35-r1) to root...
Copying /builder/dl/kmod-nf-conntrack_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-nf-flow (6.6.35-r1) to root...
Copying /builder/dl/kmod-nf-flow_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-nfnetlink (6.6.35-r1) to root...
Copying /builder/dl/kmod-nfnetlink_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-nf-reject (6.6.35-r1) to root...
Copying /builder/dl/kmod-nf-reject_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-nf-reject6 (6.6.35-r1) to root...
Copying /builder/dl/kmod-nf-reject6_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-nf-conntrack6 (6.6.35-r1) to root...
Copying /builder/dl/kmod-nf-conntrack6_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-nf-nat (6.6.35-r1) to root...
Copying /builder/dl/kmod-nf-nat_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-nf-log (6.6.35-r1) to root...
Copying /builder/dl/kmod-nf-log_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-nf-log6 (6.6.35-r1) to root...
Copying /builder/dl/kmod-nf-log6_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-crypto-hash (6.6.35-r1) to root...
Copying /builder/dl/kmod-crypto-hash_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-crypto-crc32c (6.6.35-r1) to root...
Copying /builder/dl/kmod-crypto-crc32c_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-lib-crc32c (6.6.35-r1) to root...
Copying /builder/dl/kmod-lib-crc32c_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-nft-core (6.6.35-r1) to root...
Copying /builder/dl/kmod-nft-core_6.6.35-r1_aarch64_generic.ipk.
Installing kmod-nft-nat (6.6.35-r1) to root...
Copying /builder/dl/kmod-nft-nat_6.6.35-r1_aarch64_generic.ipk.
Unknown package 'kmod-r8169'.
Package libc (1.2.5-r4) installed in root is up to date.
Package libgcc1 (13.3.0-r4) installed in root is up to date.
Unknown package 'libustream-mbedtls'.
Unknown package 'logd'.
Unknown package 'mkf2fs'.
Unknown package 'mtd'.
Unknown package 'netifd'.
Unknown package 'nftables'.
Unknown package 'odhcp6c'.
Unknown package 'odhcpd-ipv6only'.
Unknown package 'opkg'.
Unknown package 'partx-utils'.
Unknown package 'ppp'.
Unknown package 'ppp-mod-pppoe'.
Unknown package 'procd'.
Unknown package 'procd-seccomp'.
Unknown package 'procd-ujail'.
Installing uboot-envtools (2024.01-r3) to root...
Copying /builder/dl/uboot-envtools_2024.01-r3_aarch64_generic.ipk.
Unknown package 'uci'.
Unknown package 'uclient-fetch'.
Unknown package 'urandom-seed'.
Unknown package 'urngd'.
Configuring kmod-nfnetlink.
Configuring kmod-crypto-hash.
Configuring kmod-nf-reject6.
Configuring kmod-nf-conntrack.
Configuring kmod-nf-flow.
Configuring kmod-nf-reject.
Configuring kmod-nf-nat.
Configuring kmod-crypto-crc32c.
Configuring uboot-envtools.
Configuring kmod-lib-crc32c.
Configuring kmod-nf-conntrack6.
Configuring kmod-nf-log.
Configuring kmod-nf-log6.
Configuring kmod-nft-core.
Configuring kmod-nft-nat.
Configuring dropbear.
Configuring kmod-gpio-button-hotplug.
Configuring kmod-nft-offload.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency ubox for fstools
 * pkg_hash_fetch_best_installation_candidate: Packages for fstools found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency netifd for base-files
 * pkg_hash_check_unresolved: cannot find dependency jsonfilter for base-files
 * pkg_hash_check_unresolved: cannot find dependency usign for base-files
 * pkg_hash_check_unresolved: cannot find dependency openwrt-keyring for base-files
 * pkg_hash_fetch_best_installation_candidate: Packages for base-files found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package base-files.
 * opkg_install_cmd: Cannot install package busybox.
 * opkg_install_cmd: Cannot install package ca-bundle.
 * opkg_install_cmd: Cannot install package dnsmasq.
 * opkg_install_cmd: Cannot install package e2fsprogs.
 * opkg_install_cmd: Cannot install package firewall4.
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for fstools:
 *      ubox
 * opkg_install_cmd: Cannot install package fstools.
 * pkg_hash_check_unresolved: cannot find dependency r8169-firmware for kmod-r8169
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-r8169 found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package kmod-r8169.
 * opkg_install_cmd: Cannot install package libustream-mbedtls.
 * opkg_install_cmd: Cannot install package logd.
 * opkg_install_cmd: Cannot install package mkf2fs.
 * pkg_hash_check_unresolved: cannot find dependency libubox20240329 for mtd
 * pkg_hash_fetch_best_installation_candidate: Packages for mtd found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package mtd.
 * opkg_install_cmd: Cannot install package netifd.
 * opkg_install_cmd: Cannot install package nftables.
 * opkg_install_cmd: Cannot install package odhcp6c.
 * opkg_install_cmd: Cannot install package odhcpd-ipv6only.
 * opkg_install_cmd: Cannot install package opkg.
 * opkg_install_cmd: Cannot install package partx-utils.
 * opkg_install_cmd: Cannot install package ppp.
 * opkg_install_cmd: Cannot install package ppp-mod-pppoe.
 * opkg_install_cmd: Cannot install package procd.
 * opkg_install_cmd: Cannot install package procd-seccomp.
 * opkg_install_cmd: Cannot install package procd-ujail.
 * opkg_install_cmd: Cannot install package uci.
 * opkg_install_cmd: Cannot install package uclient-fetch.
 * opkg_install_cmd: Cannot install package urandom-seed.
 * opkg_install_cmd: Cannot install package urngd.
make[2]: *** [Makefile:220: package_install] Error 255
make[1]: *** [Makefile:151: _call_image] Error 2
make: *** [Makefile:310: image] Error 2

Im new to building custom images, what am i doing wrong?

the repo appears to have been moved?

repositories.conf has urls with https://downloads.openwrt.org...

but that redirects to https://mirror-03.infra.openwrt.org...?

updated the urls in repositories.conf and it works now.

maybe its just temporary, given 'mirror', but curl returned a 301 permanent move:

$ curl https://downloads.openwrt.org/snapshots/packages/aarch64_generic/luci
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

You may find it easier to build images using the firmware selector.
https://firmware-selector.openwrt.org

That's just the CDN doing its job, redirecting the generic name downloads to the mirror nearest you.

Try your curl again with a '/' on the end after luci, to indicate a directory lookup, and see what you get.

1 Like

Right, is it expected to break the build process?

the web builder runs out of room installing docker.

I will admit building the image with docker is much simpler than I initially thought.

No, and there's no indication in your logs that accessing the site is your issue. It looks like there is build breakage on some package so it simply doesn't exist in the package lists.

Take a look in https://downloads.openwrt.org/snapshots/faillogs/aarch64_generic/ and see if anything looks amiss there.

Idk what to say. Build was failing repeatedly with log similar to OP. I backed up repositories.conf, then edited all instances of https://downloads to https://mirror-03-infra

And it started working. Im probably cheating the cdn a little, but it did allow the build to run.

well it seems like maybe it was just a temporary network resolution hiccup; building seems to work with original repo urls now... :man_shrugging: