Wget returned 4 error

No. I just installed openwrt. I tried to install luci-app-sqm but failed. My main goal is to be able to use SQM. But I am also getting this error when i use "opkg install luci-app-sqm" command

Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.2/targets/ramips/mt76x8/packages/libiptext6-0_1.8.7-7_mipsel_24kc.ipk, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_install_pkg: Failed to download libiptext6-0. Perhaps you need to run 'opkg update'?
 * opkg_install_cmd: Cannot install package luci-app-sqm.

The problem just doesn't seem to make sense given the troubleshooting we've done.

I'd recommend that you make a backup then reflash the firmware (and do not keep settings). Configure from scratch (don't use the backup for now), and then try again.

ok, i am reflashing the firmware now.

reflash is finished. what should I do now? should I try the "opkg update" command first?

Based on the error screenshot, you only get errors regarding the package list signature files (.sig), right? (But not regarding the actual package lists?)

That is really weird. And the network error might be misleading.

I agree, no obvious network error. I have no problem with my internet access. I am using R4AC model router.

My device got bricked while trying to install openwrt with this file: https://downloads.openwrt.org/snapshots/targets/ramips/mt76x8/openwrt-ramips-mt76x8-xiaomi_mi-router-4a-100m-intl-initramfs-kernel.bin found at https://openwrt.org/inbox/toh/xiaomi/r4ac

So I installed openwrt with the following file: https://downloads.openwrt.org/releases/22.03.2/targets/ramips/mt76x8/openwrt-22.03.2-ramips-mt76x8-xiaomi_mi-router-4a-100m-squashfs-sysupgrade.bin
found at https://openwrt.org/toh/xiaomi/mi_router_4a_mir4a_100m#flash_layout and it worked right away.

But now, I'm having trouble installing packages.

Is there a reason why you are installing the older 22.03.2 instead of the current 22.03.3?

You should do the wget test with the exact same file that fails in the opkg update command.

no, I've never tried 22.03.3. I installed with the old version because I saw it here: Xiaomi Mi Router 4A - R4AC New revision - #6 by Gabrifol

now i got this error.

Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.2/targets/ramips/mt76x8/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.2/packages/mipsel_24kc/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

what should I type in the command line in the next step can you help me?

Well, like I said above:

wget https://downloads.openwrt.org/releases/22.03.2/targets/ramips/mt76x8/packages/Packages.gz

But that is maybe not so interesting any more. I got originally interested as in your first example the only errors seemed to come from the .sig files (while .gz files might have succeeded?). But now you got the error regarding the main package lists.

You likely should use the newer release, which has been released after the message you reference above was written. (But I do not think that it is the reason for your problems.) In general, your router seems to be a bit problematic, as it has various OEM versions R4A, R4AC, and flash layout varies).

This is more likely something about DNS/DHCP etc.

Why does your DNS settings (in /etc/config/dhcp) have list server '192.168.1.1' ?
That is not in the default settings.
To my knowledge that item lists the possible upstream servers that you want to use, and as your own router is 192.168.1.1, that looks really suspicious to me.

Your OpenWrt router is directly connected to ISP, right? No other routers in between?

1 Like

I wrote this code

wget https://downloads.openwrt.org/releases/22.03.2/targets/ramips/mt76x8/packages/Packages.gz

then I wrote "opkg update" and i got this

Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.2/packages/mipsel_24kc/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

Yes.

Someone else on the forum told me to set this up. But it didn't work. After re-flashing the firmware, it went back to default settings but still getting the same error.

I think I should return this router to amazon and buy the gigabit version. I will try to restore it to its original firmware. I hope I can return it.

show:

cat /etc/opkg/distfeeds.conf

src/gz openwrt_core https://downloads.openwrt.org/releases/22.03.2/targets/ramips/mt76x8/packages
src/gz openwrt_base https://downloads.openwrt.org/releases/22.03.2/packages/mipsel_24kc/base
src/gz openwrt_luci https://downloads.openwrt.org/releases/22.03.2/packages/mipsel_24kc/luci
src/gz openwrt_packages https://downloads.openwrt.org/releases/22.03.2/packages/mipsel_24kc/packages
src/gz openwrt_routing https://downloads.openwrt.org/releases/22.03.2/packages/mipsel_24kc/routing
src/gz openwrt_telephony https://downloads.openwrt.org/releases/22.03.2/packages/mipsel_24kc/telephony

that's really strange

1 Like

6 posts were split to a new topic: Imagebuilder download errors

do you have any other suggestions? I will try it for the last time and return it

There are 2 versions of this router. One is 100M as the screenshot you posted shows. However you mentioned that this is the 100M INT. Can you verify which version is this router and which firmware version you flashed?

xiaomi_mi-router-4a-100m-squashfs-sysupgrade.bin
or
xiaomi_mi-router-4a-100m-intl-squashfs-sysupgrade.bin

i have this
https://www.amazon.com.tr/dp/B085G5CDY7?psc=1&ref=ppx_yo2ov_dt_b_product_details

and i flashed this
https://downloads.openwrt.org/releases/22.03.2/targets/ramips/mt76x8/openwrt-22.03.2-ramips-mt76x8-xiaomi_mi-router-4a-100m-squashfs-sysupgrade.bin

Seems right to me.
Could you try the following.

  1. Reset to defaults.
  2. Connect the wan port to another router.
  3. Let it acquire settings from DHCP.
  4. Run opkg update

TLDR; I fixed this problem superficially by adding "168.119.138.211 downloads.openwrt.org" to my hosts file.
I fixed this problem again on my system by rebooting my router/nameserver.

Sorry to necro-post but I have just come across this same issue today and have some observations that may be useful.
I have a DIR-1960-A1 router which I am installing OpenWRT on. After diagnosing this problem (wget returned 4) I did a full reset on the OpenWRT install (stable 22.03.5) - so no custom settings whatsoever.
"ping -4 downloads.openwrt.org" works fine
"ping -6 downloads.openwrt.org" works fine

I was able to get "opkg update" to work by putting into my /etc/hosts file, the line:
168.119.138.211 downloads.openwrt.org
I did not disable IPv6. Unfortunately I did not try putting into my hosts file (now I can't reproduce the problem):
2a01:4f8:251:321::2 downloads.openwrt.org

After restoring my hosts file back to original and verifying that the problem returned I rebooted my pfsense router (which is also a DNS cache). This FIXED THE PROBLEM. I'm not sure why, perhaps it's DNS server simply started returning the IPv4 address for downloads.openwrt.org instead of the IPv6 address.

Very Strange: I set up an identical router on Friday and had no problems. What changed over the weekend?

I'll leave this as a comment. The modification to the hosts file is probably simpler and more targeted than disabling IPv6 completely so - a simple fix, the punters might like to try.