Imagebuilder download errors

I have the same problem on my desktop with image-builder. It is stuck here and never downloads.
I don't have IPv6 on my PC. It is disabled completely with sysctl. I think opkg is somehow hardcoded to use IPv6.

Package list missing or not up-to-date, generating it.
Building package index...
.......
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/mipsel_24kc/base/Packages.gz

I can download the file with wget.

--2023-03-05 11:26:19--  https://downloads.openwrt.org/releases/22.03.3/packages/mipsel_24kc/base/Packages.gz
Resolving downloads.openwrt.org (downloads.openwrt.org)... 168.119.138.211, 2a01:4f8:251:321::2
Connecting to downloads.openwrt.org (downloads.openwrt.org)|168.119.138.211|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 62649 (61K) [application/octet-stream]
Saving to: ‘Packages.gz’

Packages.gz                                                 100%[=========================================================================================================================================>]  61.18K  --.-KB/s    in 0.05s   

2023-03-05 11:26:19 (1.24 MB/s) - ‘Packages.gz’ saved [62649/62649]

Your problem is likely different, please do not mix things up.

If you have just the small built-in wget replacement uclient-fetch, it does prefer IPv6 over IPv4 if IPv6 addressing and DNS is found, and has no good fallback to IPv4.
But if you install the full GNU wget (wget-ssl), you get a proper fallback.

 OpenWrt SNAPSHOT, r22199-1f53fa2b83
 -----------------------------------------------------
root@router5:~# which wget
/usr/bin/wget

root@router5:~# wget --version
GNU Wget 1.21.3 built on linux-gnu.

Note that if you explicitly disable IPv6 for some reason, you should also disable IPv6 address resolving, or you may end up with problem in some situations.

Full wget is available as this is a desktop PC.

If we are talking about opkg, we are talking about the router, running OpenWrt, right?

No. I am trying image-builder on PC.

I couldn't find any solution to disable it from openresolv. I will try installing dnsmasq as cache and try to disable it from there.

I moved this to a separate thread, as your download problems from PC (with intentionally disabled IPv6) do not have much common with the router's wget 4 errors from opkg.

Thanks. The other poster said i disabled IPv6 so I thought we had the same issue.