Cannot update OpenWrt - wget error 5

So tried the other night to update 2 OpenWRT devices. Both returning wget error 5.

Any ideas?

Thanks

Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.3/targets/ath79/generic/packages/Packages.gz, wget returned 5.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.3/packages/mips_24kc/base/Packages.gz, wget returned 5.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.3/packages/mips_24kc/luci/Packages.gz, wget returned 5.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.3/packages/mips_24kc/packages/Packages.gz, wget returned 5.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.3/packages/mips_24kc/routing/Packages.gz, wget returned 5.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.3/packages/mips_24kc/telephony/Packages.gz, wget returned 5.

What is the output of

ping -6 ipv6.google.com

?

I block ipv6 traffic so this will fail.

However, a ping 8.8.8.8 and ping google.com resolves fine as expected.

For Gnu wget error 5 means SSL verification error. Not sure Openwrt used wget returns the same codes. If yes that may be a hint.

1 Like

Error 5 will occur if the version you are running is old enough that the root certificates installed in it are no longer valid.

But that doesn't seem to be the case here. You could try copying the URL to run wget directly from the command line.

1 Like

or the date is wrong on the device.

5 Likes

did you have extra wget package installed? I had extra wget packages included in my custom image and opkg gave download error. Once they were removed, opkg is back to normal

thanks for this. it worked

great!

EDIT: @deanfourie (as the OP) -- have you made any progress? How anything solved your issue? if so...

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

@gperete isn't OP though ...

2 Likes

Ive just been through a massive issue with cert issues previously, not again....

Just connected and confirmed that this is still an issue.

Any ideas? I've had this before and the only way I fixed it was with a fresh install of OpenWRT. This keeps happening to me.

The only difference between me and I guess everyone else is, these devices are offline all the time as in NO internet access until I want to update them.

  • Is this a custom firmware?
  • Did you remove things from the image like certs, ssl, etc?

Can you clarify your statement here... what does "update" mean in your context?

  1. Install new packages using the opkg install feature?
  2. upgrade the entire OpenWrt firmware (using sysupgrade)
  3. or upgrade existing packages installed on the device?

If 1, that will, of course, require normal opkg functionality so the error you are seeing is relevant and should be solved.

OTOH, if you're talking about 2, opkg doesn't figure into that process at all anyway, so the problem can safely be ignored.

Finally, if you mean 3, that is not recommended and will likely cause you more issues in the future. See the following warning:

Upgrading packages (via the CLI opkg upgrade command or the LuCI Upgrade... button) can result in major problems. It is generally highly discouraged, unless you know what you are doing or if there is specific instruction to do so.

Also, regarding the wget error itself...

  • @lleachii asked some good questions -- please answer those.
  • but if this is a standard release image, there is one other situation that can cause this to happen -- if you restored a backup that contained all of /etc or brought over older certs, it could certainly cause this problem. Therefore, please let us know how you arrived at your current configuration -- both in terms of the image itself and the actual running conifg.
1 Like

Option 3, however im not doing it via CLI. I',m doing it via GUI.

Under software and update. It attempts to download updates for already installed packages and fails.

You’re better off for the fact that it fails. The CLI and LuCI methods are equivalent - both are likely to cause major problems. M

Read the two links below

Don’t upgrade your packages!

1 Like

Ok thanks, that answers that.