apk ERROR - version too old; bad update ?
-
- Offline
- 2 months 2 weeks ago
- 2018-01-10
* Alpine Linux 3.7.0 x64
When i try apk update / apk upgrade i see this error message:
# apk update
ERROR: This apk-tools is too old to handle installed packages
ERROR: Unable to read database state: Operation not permitted
ERROR: Failed to open apk database: Operation not permitted
Some diags:
# apk | head -n 1
apk-tools 2.8.1, compiled for x86_64.
# uname -a
Linux fs2 4.9.65-1-hardened #2-Alpine SMP Mon Nov 27 15:36:10 GMT 2017 x86_64 Linux
# df -hT | grep ext4
/dev/sde3 ext4 5.4G 548.9M 4.5G 11% /
/dev/sde1 ext4 92.8M 21.4M 64.4M 25% /boot
/dev/md0 ext4 1.3T 91.0G 1.2T 7% /RAID
I found only this discussion : https://dev.alpinelinux.org/irclogs/%23alpine-linux-2016-07.log
and try this steps:
wget http://dl-3.alpinelinux.org/alpine/v3.7/main/x86_64/apk-tools-static-2.8.2-r0.apk
tar -xf apk-tools-static-2.8.2-r0.apk
cd ./sbin
chmod +x apk.static
# ./apk.static | head -n 1
apk-tools 2.8.2, compiled for x86_64.
# ./apk.static update
ERROR: This apk-tools is too old to handle installed packages
ERROR: Unable to read database state: Operation not permitted
ERROR: Failed to open apk database: Operation not permitted
- Same problem.
How to fix this ?
Hi @Amin. I am currently using Alpine 3.7.0 stable on x86_64, and following an earlier system upgrade from 3.6.2, I started getting a
WARNING: This apk-tools is OLD! Some packages might not function properly
message when doing a routine system upgrade (but unlike your case, there were nopermission denied
messages). As a reference, my current pinned repositories are:-I was able to get that error message to disappear by doing:-
Note: After the system upgrade (Alpine 3.6.2 to 3.7.0), in order to try to get rid of the
WARNING: This apk-tools is OLD!
message, I did unsuccessful efforts generally following these instructions , including:-I am not sure whether those steps were required to satisfy the error message: the error message disappeared only later, when I did
Does that help? Could anyone clarify or assist please?
Hi, ReproducibleBuildsAreAGoodStandard !
I use a clean-installed Apline 3.7.0 and my apk also was broken after one of updates.
Magic commands with apk.static don't help in my case.
I suggest something about package-database crash, but i don't found how to fix or rebuild this like rpm --rebuilddb.