[Solved] Apk update fails

The apk update command failed with code 8 :

ERROR: wget: exited with error 4
WARNING: updating and opening https://downloads.openwrt.org/releases/25.12.0-rc1/targets/mediatek/filogic/packages/packages.adb: unexpected end of file
ERROR: wget: exited with error 4
WARNING: updating and opening https://downloads.openwrt.org/releases/25.12.0-rc1/packages/aarch64_cortex-a53/base/packages.adb: unexpected end of file
ERROR: wget: exited with error 4
WARNING: updating and opening https://downloads.openwrt.org/releases/25.12.0-rc1/targets/mediatek/filogic/kmods/6.12.62-1-6bb2fd3da9939ec80449118616aff3fd/packages.adb: unexpected end of file
ERROR: wget: exited with error 4
WARNING: updating and opening https://downloads.openwrt.org/releases/25.12.0-rc1/packages/aarch64_cortex-a53/luci/packages.adb: unexpected end of file
ERROR: wget: exited with error 4
WARNING: updating and opening https://downloads.openwrt.org/releases/25.12.0-rc1/packages/aarch64_cortex-a53/packages/packages.adb: unexpected end of file
ERROR: wget: exited with error 4
WARNING: updating and opening https://downloads.openwrt.org/releases/25.12.0-rc1/packages/aarch64_cortex-a53/routing/packages.adb: unexpected end of file
ERROR: wget: exited with error 4
WARNING: updating and opening https://downloads.openwrt.org/releases/25.12.0-rc1/packages/aarch64_cortex-a53/telephony/packages.adb: unexpected end of file
ERROR: wget: exited with error 4
WARNING: updating and opening https://downloads.openwrt.org/releases/25.12.0-rc1/packages/aarch64_cortex-a53/video/packages.adb: unexpected end of file

I am using 25.12.0-rc1 on MT6000. I ran this previously:

apk update
apk add sudo ca-certificates ca-bundle curl wget wget-ssl tar unzip bind-tools

with no issues. No major config changes since then (except a few firewall rules). Wondering if I broke apk with installing any of the above packages or the reason is something different?

You didn't damage the apk by installing those packages.

The error pattern (all feeds, unexpected EOF, wget error 4) indicates a network problem, typically IPv6. On 25.12.0-rc1, the apk tries IPv6 first; if the IPv6 path is broken or has MTU issues, .adb downloads are truncated. (It's just a guess so I apologize if it doesn't work. :sweat_smile: )

You can quickly verify this by temporarily disabling IPv6:

ifdown wan6; apk update; ifup wan6

If that works, the cause is IPv6.

1 Like

You installed BIND?

(Have you verified it's working?)

wget was missing?

Is this a custom firmware image?

2 Likes

By default wget is provided by uclient-fetch, which is not a full wget implementation.

4 Likes

No bind itself, only bind-tools.

Regular OpenWrt image.

1 Like

Thanks - you set me digging in the right direction! Ex-post this was rather obvious mistake - I forgot to bind AGH to the router itself in AGH yaml file :shushing_face:, and there was no DNS available for the router. 127.0.0.1 was the missing bit in /opt/AdGuardHome/AdGuardHome.yaml:

dns:
  bind_hosts:
    - 127.0.0.1

can you show us your current configuration just to understand (please hide public ip addresses/passwords/mac address), obviously if you want

cat /etc/config/network