Opkg can't update

Just migrated from 3.11.x to 5.1.0 and I’m getting this when trying to run opkg update. I’ve seen some other threads along these lines, but they all seem to focus on 3.11.x. This is with an omnia.

Side note, wget is not installed.

root@turris:/etc# opkg update
Package ucollect-config version 117 has no valid architecture, ignoring.
Package https-cert version 3 has no valid architecture, ignoring.
Downloading https://repo.turris.cz/hbs/omnia/packages/core/Packages.gz
*** Failed to download the package list from https://repo.turris.cz/hbs/omnia/packages/core/Packages.gz

Downloading https://repo.turris.cz/hbs/omnia/packages/base/Packages.gz
*** Failed to download the package list from https://repo.turris.cz/hbs/omnia/packages/base/Packages.gz

Downloading https://repo.turris.cz/hbs/omnia/packages/cesnet/Packages.gz
*** Failed to download the package list from https://repo.turris.cz/hbs/omnia/packages/cesnet/Packages.gz

Downloading https://repo.turris.cz/hbs/omnia/packages/luci/Packages.gz
*** Failed to download the package list from https://repo.turris.cz/hbs/omnia/packages/luci/Packages.gz

Downloading https://repo.turris.cz/hbs/omnia/packages/node/Packages.gz
*** Failed to download the package list from https://repo.turris.cz/hbs/omnia/packages/node/Packages.gz

Downloading https://repo.turris.cz/hbs/omnia/packages/openwisp/Packages.gz
*** Failed to download the package list from https://repo.turris.cz/hbs/omnia/packages/openwisp/Packages.gz

Downloading https://repo.turris.cz/hbs/omnia/packages/packages/Packages.gz
*** Failed to download the package list from https://repo.turris.cz/hbs/omnia/packages/packages/Packages.gz

Downloading https://repo.turris.cz/hbs/omnia/packages/routing/Packages.gz
*** Failed to download the package list from https://repo.turris.cz/hbs/omnia/packages/routing/Packages.gz

Downloading https://repo.turris.cz/hbs/omnia/packages/sidn/Packages.gz
*** Failed to download the package list from https://repo.turris.cz/hbs/omnia/packages/sidn/Packages.gz

Downloading https://repo.turris.cz/hbs/omnia/packages/telephony/Packages.gz
*** Failed to download the package list from https://repo.turris.cz/hbs/omnia/packages/telephony/Packages.gz

Downloading https://repo.turris.cz/hbs/omnia/packages/turrispackages/Packages.gz
*** Failed to download the package list from https://repo.turris.cz/hbs/omnia/packages/turrispackages/Packages.gz

Collected errors:
 * opkg_download: Failed to download https://repo.turris.cz/hbs/omnia/packages/core/Packages.gz, wget returned 255.
 * opkg_download: Failed to download https://repo.turris.cz/hbs/omnia/packages/base/Packages.gz, wget returned 255.
 * opkg_download: Failed to download https://repo.turris.cz/hbs/omnia/packages/cesnet/Packages.gz, wget returned 255.
 * opkg_download: Failed to download https://repo.turris.cz/hbs/omnia/packages/luci/Packages.gz, wget returned 255.
 * opkg_download: Failed to download https://repo.turris.cz/hbs/omnia/packages/node/Packages.gz, wget returned 255.
 * opkg_download: Failed to download https://repo.turris.cz/hbs/omnia/packages/openwisp/Packages.gz, wget returned 255.
 * opkg_download: Failed to download https://repo.turris.cz/hbs/omnia/packages/packages/Packages.gz, wget returned 255.
 * opkg_download: Failed to download https://repo.turris.cz/hbs/omnia/packages/routing/Packages.gz, wget returned 255.
 * opkg_download: Failed to download https://repo.turris.cz/hbs/omnia/packages/sidn/Packages.gz, wget returned 255.
 * opkg_download: Failed to download https://repo.turris.cz/hbs/omnia/packages/telephony/Packages.gz, wget returned 255.
 * opkg_download: Failed to download https://repo.turris.cz/hbs/omnia/packages/turrispackages/Packages.gz, wget returned 255.

Hello @darakian,

From the output, we are not able to see where the could be the culprit. Would you please send us diagnostics and send it to tech.support@turris.cz? Once we will have them, we can take a look. Wget is not preinstalled by default, it is part of NAS and LXC package list. There is being used uclient-fetch. It is a tiny wget replacement in OpenWrt.

Are you able to ping to any IP address to see if your Internet connection works and ping to any DNS address works? Answers to these questions will help us as well.

1 Like

Ping and dig both work fine for a variety of addresses and my router operates normally for all clients connected. I tried uclient-fetch and got the following

root@turris:~# uclient-fetch https://repo.turris.cz/hbs/omnia/packages/core/Packages.gz
Downloading 'https://repo.turris.cz/hbs/omnia/packages/core/Packages.gz'
Connecting to 2001:1488:ac15:ff80::69:443
Writing to 'Packages.gz'
Packages.gz          100% |*******************************| 92820   0:00:00 ETA
Download completed (92820 bytes)
root@turris:~#

I suspect this is a certificate issue. I’ve emailed in my diag output.

Certificate issue? Check your time settings.

Timezone was set to CEST which is not where I am. I updated to PDT and still no dice.

Edit:
Maybe not a cert issue. Just saw that opkg has a --no-check-certificate option. Tried it and got the same error.

Edit 2:
Should my /etc/opkg.config has an architecture? The “No valid architecture” error seems to be fairly common around the web.

My config currently reads

root@turris:/etc# cat opkg.conf
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
option check_signature

Edit 3:
Every download/update/status/info command throws the same two package errors

root@turris:~# opkg download adblock
Package ucollect-config version 117 has no valid architecture, ignoring.
Package https-cert version 3 has no valid architecture, ignoring.
Collected errors:
 * opkg_download_cmd: Cannot find package adblock.

root@turris:~# opkg status ucollect-config
Package ucollect-config version 117 has no valid architecture, ignoring.
Package https-cert version 3 has no valid architecture, ignoring.

root@turris:~# opkg info ucollect-config
Package ucollect-config version 117 has no valid architecture, ignoring.
Package https-cert version 3 has no valid architecture, ignoring.

Installed packages do show info though

root@turris:~# opkg status dnsmasq-full
Package ucollect-config version 117 has no valid architecture, ignoring.
Package https-cert version 3 has no valid architecture, ignoring.
Package: dnsmasq-full
Version: 2.80-16.1
Depends: libc, libubus, libnettle, kmod-ipt-ipset, libnetfilter-conntrack
Status: install user installed
Architecture: arm_cortex-a9_vfpv3-d16
Conffiles:
 /etc/config/dhcp 61118fa34920b8f39b4d8b723ac592216c87e07eb0070b2989b2fa7c5dfdd8d1
 /etc/dnsmasq.conf 1e6ab19c1ae5e70d609ac7b6246541d52042e4dee1892f825266507ef52d7dfd
Installed-Time: 1598816654

Trying to install the missing packages throws the predictable error

root@turris:~# opkg install ucollect-config
Package ucollect-config version 117 has no valid architecture, ignoring.
Package https-cert version 3 has no valid architecture, ignoring.
Unknown package 'ucollect-config'.
Collected errors:
 * opkg_install_cmd: Cannot install package ucollect-config.

Is it possible to manually replace ucollect-config and https-cert? If so can I get some guidance?
Possibly this commit is related to the https-cert issue?

Can I simply remove those two packages to restore functionality?

Does migration went fine? If you have issues with packages related to services which should be replaced after migration, it kind of seems it is not so right. Can you rollback to 3.x ? (using schnapps…maybe, coz it is maybe better to try migrate it again , rather to fix it after …)

https://docs.turris.cz/geek/tos3_migration/#short-list-of-changes

uCollect was removed and replaced with Sentinel.

As for “https-cert” maybe this is related ?

Netutils package list was dropped and most of the advanced protocols have to be now installed manually.

Aside there is mentioned this “known bug” related to updater
https://docs.turris.cz/geek/tos3_migration/#updater-reports-error-about-unavailable-package

So yes, you probably need to remove those two packages or/and alter your updater.d files (opkg-auto.lua, user.lua, localrepo.lua …). You should check if you are using any of those original 3.x foris package-lists (netutils, datacollect, majordomo, netbackups…) and disable(remove) them before migration.

Also you should uninstall any tools which are part of the busybox applets (wget, ls, top …etc,) . those full version tools are having post-install steps handling the symlinks and it might be the case that it cause you some issues during essential update step (fetching the packages/signatures and so on).

Bit late to do it before migration. Ok so I need to remove those packages, Using opkg remove... I get the same error that they are not available. My updater.d files are

root@turris:/etc/updater/conf.d# pwd
/etc/updater/conf.d
root@turris:/etc/updater/conf.d# ls -la
drwxr-xr-x    1 root     root           198 Aug 30 12:46 .
drwxr-xr-x    1 root     root           134 Aug 30 12:46 ..
-rw-------    1 root     root          3005 Aug 24 16:25 example.lua
-rw-------    1 root     root           260 Aug 24 16:25 localrepo.lua
-rw-------    1 root     root            61 Jun  4 04:33 opkg-auto.lua
-rw-------    1 root     root          1178 Aug 24 16:25 opkg.lua
-rw-------    1 root     root          3756 Aug 24 16:25 switch-branch.lua
-rw-r--r--    1 root     root          2594 Aug 24 16:25 turris-pkglists.lua
-rw-------    1 root     root          2370 Aug 24 16:25 turris.lua
-rw-r--r--    1 root     root           159 Sep  5  2016 user.lua

I’m not sure where to check for the package lists though. turris-pkglists.lua references /usr/share/updater/pkglists.json which does not have an entry for either of the two packages.

If those are not present on system. You just need to remove them from the .lua files.
Maybe remove the “netutils” from /etc/config/updater so it is not looking for any package within that package list. And run the pkgupdate manually in shell to see what is happening.

TBH : instead of fixing it i would just rollback using schnapps to working snapshot. After rollback i would do the package-list removal together with manual uninstall of the package which cause you this issue. And after that i will try the migration one more time.

notes....

I am just wondering, why did you migrate from 3.x to 5.x? There is for sure newer Openwrt branche and newer kernel, reForis instead of Foris and Sentinel instead of uCollect…but i do not see any major benefits. So i am staying with 3.x as long as possible. I have lot of tailoring and direct changes, so for me migration is not an option right now. If i will be forced to switch to 5.x i will do it from scratch on clear system. I mean clear install instead of migration.

But those packages are not in the lua files. Running pkgupdate didn’t seem to change anything. I’ve tried both with and without the netutils entry in /etc/config/updater
Output is as follows

root@turris:/etc/config# pkgupdate
INFO:Target Turris OS: 5.1.0
WARN:Requested package foris-storage-plugin-l10n-de that is missing, ignoring as requested.
WARN:Requested package reforis-diagnostics-plugin-l10n-de that is missing, ignoring as requested.
WARN:Requested package reforis-snapshots-plugin-l10n-de that is missing, ignoring as requested.

As for rolling back. It seems like this should be an easy fix if I can find where the reference to these packages is.

I’ve discovered /usr/lib/opkg/status and removed the status for ucollect-config and https-cert. opkg no longer complains about those two packages, but fails to update.

if you are failing during opkg update are you having correcrt repository at use? What is the causing the failure?

if you can’f ix it, rollback …using schnapps rollback <number of snapshot> to pre-migration snaphost which worked and try to migrate again.

Or you can apply medikit instead.

The issue has been resolved. turris support emailed me with a suggestion to run /usr/bin/update_alternatives.sh. After running it opkg update works :slight_smile:

3 Likes

Thanks. This happened to me as well after a 3.x to 5.x migration and running the update_alternatives.sh script fixed it.

1 Like

This helped me, thank you :heart:

update_alternatives was needed for me as well, though it doesn’t fix other issues encountered when updating to 5.1.7.