Opkg update failed to download

root@OpenWrt:~# nslookup downloads.openwrt.org
Server:         127.0.0.1
Address:        127.0.0.1:53

Non-authoritative answer:
downloads.openwrt.org   canonical name = mirror-02.infra.openwrt.org
Name:   mirror-02.infra.openwrt.org
Address: 2a01:4f8:251:321::2

Non-authoritative answer:
downloads.openwrt.org   canonical name = mirror-02.infra.openwrt.org
Name:   mirror-02.infra.openwrt.org
Address: 168.119.138.211

root@OpenWrt:~#

Looks OK

Run cat /etc/resolv.conf

How old is the snapshot you're running?

The packages I see in the screenshot were built on April 21st.

If your snapshot is older, you'll need to get the newest build before you can do anything with packages.

root@OpenWrt:~# cat /etc/resolv.conf
search lan
nameserver 1.1.1.1
nameserver ::1
root@OpenWrt:~#

Still the same results of opkg update.

Did you see what I posted above about using older snapshots with newer packages?

When you say 'packages', is that the firmware that I downloaded and burned into the SD card? I downloaded the latest if that's what you mean.

The firmware is what you used to install OpenWrt.

Packages are what you're trying to download after you installed OpenWrt...and is failing.

Snapshot firmware images change nightly, and the packages that go with those snapshots match that version of the firmware.

So if you download and installed a snapshot earlier, and didn't do an opkg update or opkg install before the snapshot changed, it would cause a mismatch.

You might try installing the latest snapshot, then do your opkg update or opkg install work.

Based on that nslookup result (showing ipv6 address first, like normally) one possibility is that your wget tries to use ipv6 and fails (if you have no actual ipv6 connectvity).

In case you are using the default wget replacement "uclient-fetch", you might try installing the proper GNU wget package, which handles "ipv6 addressing but no ipv6 connectivity" better than uclient-fetch. E.g. download "wget-ssl" package .ipk to your PC, and install it.

1 Like

Thanks. So how do I install the latest 'packages'? I really don't know why it has the old packages since I am just starting to update the packages after it's first boot in the Rpi and that's my problem, it's failing to update. Should I try to reinstall the firmware again?

Thanks, but I don't think I am using ipv6 in my router.

Download and install the latest snapshot.

Then, try updating the packages.

You had a couple of packages that made it through, so my guess is there was no change to those in the latest nightly build -

Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/targets/bcm27xx/bcm2710/kmods/5.10.111-1-732dd1ce27d3ef9caa14a9221362fecb/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_kmods
Downloading https://downloads.openwrt.org/snapshots/targets/bcm27xx/bcm2710/kmods/5.10.111-1-732dd1ce27d3ef9caa14a9221362fecb/Packages.sig
Signature check passed.
1 Like

Ok, thanks again. I will try that later.

But your router gets IPv6 addresses as DNS answers...

That may confuse the download tools, which pretty much always prefer IPv6.
My advice was specifically for "ipv6 addressing but no ipv6 connectivity" situation like yours.

Sorry, I don't know about that. So do I have to disable ipv6 and how?

That was not my advice.
I adviced to install the full GNU wget that handles the fallback to ipv4 better.

Ok, thanks. I am new to this openwrt. I am just starting to get my raspberry pi as a router/firewall using it so I am not really sure how to do what you are suggesting. If you can tell me how to do that, I really appreciate it.

DL the wget package to your computer

transfer it to the Pi, to /tmp (winscp for windows, scp for *nix).

ssh to the pi and do an opkg install /tmp/wget.full.filename.ipk

1 Like

I think it would be much easier to download and flash the stable version of OpenWrt, rather than going into all these experiments for a snapshot.

4 Likes

I am using the 21.02.1 stable release on a Raspberry Pi 3B Plus. The subject of this discussions is how I can update the packages successfully.

You can't install snapshot packages to a release version.

Maybe you installed a snapshot accidentally instead of the release

1 Like

The logs are saying you're using a snapshot.

Run ubus call system board