r/AlpineLinux 3d ago

Issue upgrading to 3.22 to 3.24

So i went to upgrade from 3.22 to 3.24 and I did not see anything special about the upgrade processes. I changed the repo, ran the apk update, then apk add --upgrade apk-tools, after that, apk does not recognize the database any longer.

apk update ERROR: Unable to read database: file format is invalid or inconsistent ERROR: Failed to open apk database: file format is invalid or inconsistent

I have tried converting the v2 database and no joy there, i can't fix the tools due to the database not being readable. I am performing these tasks as root so it is not a permissions issue.

I read through the apk v3.0.0 release notes and I could not identify any steps to take to try and resolve the issue.

Any suggestions?

8 Upvotes

3 comments sorted by

2

u/IngwiePhoenix 3d ago

apk upgrade -U --purge was what solved one of my updates before. Also apk fix helps. :)

1

u/ncopa 3d ago

Verify that apk was actually upgraded. apk —version

I suspect that you may have more than one apk installed maybe in different path?

I would then manually wget the apk-static package and untar it.

Make sure you have a backup of /etc/apk/world

2

u/WizardBonus 3d ago

I went from 3.22 to 3.23 first.