On 22.03.3 stable, getting "Cannot satisfy dependencies / kernel is not compatible" errors

Hello,

I'm running an official 22.03.3 image for nanopi r4s, and I'm getting errors that look like a snapshot has gone away. Looking for any suggestions about the problem - the FAQ doesn't address these errors on stable images.

Any kmod package seems to do this, though others are fine. Here's an example:

root@gateway:~# opkg install kmod-ipt-ipset
Unknown package 'kmod-ipt-ipset'.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-978cadea017a004ae5b73fcf48befb86) for kmod-nf-reject
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-nf-reject found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-978cadea017a004ae5b73fcf48befb86) for kmod-nf-ipt
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-nf-ipt found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-978cadea017a004ae5b73fcf48befb86) for kmod-nf-log
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-nf-log found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-978cadea017a004ae5b73fcf48befb86) for kmod-ipt-core
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-core found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-978cadea017a004ae5b73fcf48befb86) for kmod-nfnetlink
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-nfnetlink found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-978cadea017a004ae5b73fcf48befb86) for kmod-ipt-ipset
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-ipset found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package kmod-ipt-ipset.

I don't understand the architecture error - my architectures appear to match:

root@gateway:~# opkg print-architecture
arch all 1
arch noarch 1
arch aarch64_generic 10

The package control file has Architecture: aarch64_generic.

As far as I know, I'm running stable 22.03.3 - my revision matches exactly what's in the github release at https://github.com/openwrt/openwrt/releases/tag/v22.03.3 :

# cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='22.03.3'
DISTRIB_REVISION='r20028-43d71ad93e'
DISTRIB_TARGET='rockchip/armv8'
DISTRIB_ARCH='aarch64_generic'
DISTRIB_DESCRIPTION='OpenWrt 22.03.3 r20028-43d71ad93e'
DISTRIB_TAINTS=''

Same errors if I download and try to install locally.

Any ideas what I should look at next?

You did run

opkg update

first before trying to download the kmod?

Yes:

root@gateway:~# opkg update
Downloading https://downloads.openwrt.org/releases/22.03.3/targets/rockchip/armv8/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/releases/22.03.3/targets/rockchip/armv8/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_generic/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_generic/base/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_generic/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_generic/luci/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_generic/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_generic/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_generic/routing/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_generic/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_generic/telephony/Packages.sig
Signature check passed.
root@gateway:~# opkg install kmod-ipt-ipset
Unknown package 'kmod-ipt-ipset'.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-978cadea017a004ae5b73fcf48befb86) for kmod-nf-reject
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-nf-reject found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-978cadea017a004ae5b73fcf48befb86) for kmod-nf-ipt
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-nf-ipt found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-978cadea017a004ae5b73fcf48befb86) for kmod-nf-log
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-nf-log found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-978cadea017a004ae5b73fcf48befb86) for kmod-ipt-core
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-core found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-978cadea017a004ae5b73fcf48befb86) for kmod-nfnetlink
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-nfnetlink found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-978cadea017a004ae5b73fcf48befb86) for kmod-ipt-ipset
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-ipset found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package kmod-ipt-ipset.

Strange...
How about to sysupgrade to 22.03.5 and try it again?

I figured out what's going on - tl, dr: this device was missing the kernel package, and for whatever reason, that package isn't available to install via opkg's lists.

This error message is really the key:

I originally thought the version or the architecture was the important part, but I was wrong. The package kernel is not listed in the Packages files: see https://downloads.openwrt.org/releases/22.03.3/targets/rockchip/armv8/packages/Packages for an example. So if if you don't have it installed, opkg doesn't know that it exists - and so can't resolve dependencies that involve it.

Even though it isn't in the list, kernel is a package that can be downloaded, for instance, from https://downloads.openwrt.org/releases/22.03.3/targets/rockchip/armv8/packages/kernel_5.10.161-1-978cadea017a004ae5b73fcf48befb86_aarch64_generic.ipk

After grabbing that file and installing, installations are working normally again.

It'd be interesting to know how kernel went missing, and why openwrt doesn't put it in the package lists.

1 Like

Because due to the fact OpenWrt is an embedded OS, there's no method to manipulate Kernel like a package. In other words, it cannot be uninstalled, cannot be upgraded, etc.

To do so, you would use another image.

Well you're right the kernel cannot be manipulated as a package. But the problem in this post has to do with the package named kernel.

That package doesn't contain the kernel - it exists to enable other packages to depend on the particular kernel my device is running. That way, opkg can determine if a kmod package is compatible with the current system. And as I found kernel can be removed (though as you say, this doesn't remove the kernel).

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.