Opkg update error (wget returned 4)

Hey, I have been using LEDE on my netgear r8000 for a little bit and just today beginning around 5:30 or so, when trying to use the opkg update command it gives me wget returned 4. Is there some rearranging of the site or something?
I am curious because I have not been able to set-up the web interface to turn on wireless, but ethernet is fine. Hope I make sense.

What happened to the luci-ssl package?? it keeps saying there are unresolved dependencies.

Depending on your version, and how old it is, the kernel you are running likely no longer reflects the packages hosted out of source.

You likely need to update to the latest version and then compile all the packages you need at that time. They are not static, more a moving target.

1 Like

Thanks. I think it started with just the Dec. 20th build - I didn't bother to get the web interface installed right away. Just the next day it was requiring dependencies that i thought could be in the repository. Turns out I was SOL. Anyway I ended up searching the web thinking that sysupgrade would be my ticket away from my own mess - The command ended with the file not being compatible. So, I did some more searching on file conversion, specifically for .chk to .trx. It's just really weird why my r8000 is acting up now. I'm sorry I didn't provide much helpful information.

i have the same bug after a fresh installation of lede.
SNAPSHOT, r2816-355e150
device: TD-W8970
ping on 8.8.8.8 works.

Failed to establish connection
Signature check failed.
Remove wrong Signature file.
Collected errors:

and so on

1 Like

I just upgraded from OpenWRT to LEDE and faced the same error. The download fails randomly but not always.

Finally I found that it's caused by malfunction IPv6. Tried nslookup the download hostname, it returned both IPv4 and IPv6 addresses. But my ISP doesn't support IPv6 so it couldn't download.

I added option ipv6 0 to disable IPv6 for the network interface in /etc/config/network. Opkg works after restart.

2 Likes

Where in the network file did you place option ipv6 0 ?? How did you figure out where to add option ipv6 0?? Putting it at the end didn't work and it just ran through with the same error.

Try adding it under config interface wan as shown below (not too sure)

config interface wan
    option ipv6 0

According to the wiki, that option is valid for all protocol types (https://wiki.openwrt.org/doc/uci/network)

1 Like

With my knowledge on this I am not getting the same result. The interfaces I have are loopback and lan. I have added it under lan and ran /etc/init.d/network reload. I am trying this on a pi b+ by the way. I will try using a usb nic .

Wait, so you want to turn on the wireless? You can do that via cmdline

EDIT: and maybe do an offline install of LUCI (https://wiki.openwrt.org/doc/howto/luci.essentials#minimalistic_offline_installation) for the interface and use that to troubleshoot via logs/settings

1 Like

Yeah, I mean I would just like to get it set up. From the pi ping works, the option ipv6 0 still gives me an error. Thanks for taking an interest. I don't know.
Have you used the image builder?
This is starting to really be way over my skill level.

https://lede-project.org/docs/user-guide/imagebuilder?s[]=imagebuilder

Yeah I've used it before, works

For (easy) prepackage selection:

Open and Edit: /include/target.mk (after extracting the imagebuilder)

Find the section # Default packages and add/edit the following

(this is taken directly from https://github.com/gwlim/mips74k-lede-patch/blob/master/patch/099-add-default-package.patch)

 # Default packages - the really basic set

DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch \
luci luci-app-ddns luci-app-mwan3 luci-app-sqm luci-app-upnp luci-proto-relay luci-proto-3g luci-app-wol \
kmod-usb-acm kmod-usb-serial-ipw kmod-usb-serial-option kmod-usb-serial-qualcomm kmod-usb-serial-sierrawireless kmod-usb-serial-wwan \
kmod-usb-net-cdc-eem kmod-usb-net-cdc-ether kmod-usb-net-cdc-mbim kmod-usb-net-cdc-ncm kmod-usb-net-cdc-subset kmod-usb-net-hso kmod-usb-net-huawei-cdc-ncm kmod-usb-net-kalmia kmod-usb-net-qmi-wwan kmod-usb-net-sierrawireless \
umbim uqmi wwan comgt comgt-directip comgt-ncm usb-modeswitch kmod-sched-cake \
464xlat 6in4 6rd 6to4 aiccu ds-lite map-t ppp-mod-pptp pppossh xl2tpd \
igmpproxy

Run make info to obtain a list of defined profiles.
And finally followup with the make image PROFILE=NAMEOFPROFILE command

PS: I'm not sure what packages are preset for the R8000 builds, but those should be included in addition to what is posted above

1 Like

I had a similar issue. My ISP DOES support IPv6, so it's curious as to why connections are failing randomly.

1 Like

In my case I had to temporarily disable Pi-Hole and opkg update started functioning.

Just in case someone runs through the same issue. I've had the same problem mentioned here, but none of these solutions worked. It turned out to be just the opkg proxy default configuration, in my case I removed the proxy and it worked!

I've also seen the issue be that there is no Gateway and/or DNS addresses configured on LAN when WAN is disabled (e.g. a dumb AP configuration).

3 Likes

Yes. I have faced exactly the same problem. My DNS was not set on the router WAN. My computers had manual DNS, thus I was unable to notice at first. I thought that everything was okay.

Old topic but actual porblem solved with a simple setting:

I had the same error (wget returned 4) with a Dumb AP configuration.
I have a Raspberry Pi for DNS and the only thing I had to do to correct this issue was to forced DNS Forwarding with my Raspberry PI address in Luci : Network > DHCP an DNS > General Settings > DNS Forwardings > add your DNS IP address

1 Like

Check the default gateway and DNS settings.
Configure the upstream DNS provider properly.

1 Like

I already tried this solution in the past but it doesn't solved the "Opkg update error (wget returned 4", the only thing worked for me was to set my RaspBerry IP in DNS Forwardinds (I enter both IP, IPV4 & IPV6)