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 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.
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.
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.
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).