apk ERROR - version too old; bad update ?

3 posts / 0 new
Last post
#1 Wed, 2018-01-10 14:37
Amin
  • Amin's picture
  • Offline
  • Last seen: 2 months 2 weeks ago
  • Joined: 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 ?

Thu, 2018-01-11 23:45
ReproducibleBui...
  • ReproducibleBuildsAreAGoodStandard's picture
  • Offline
  • Last seen: 1 month 3 weeks ago
  • Joined: 2017-05-05

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 no permission denied messages). As a reference, my current pinned repositories are:-


http://dl-3.alpinelinux.org/alpine/v3.7/community
@edge http://dl-3.alpinelinux.org/alpine/edge/main
@edgecommunity http://dl-3.alpinelinux.org/alpine/edge/community
@testing http://dl-3.alpinelinux.org/alpine/edge/testing

I was able to get that error message to disappear by doing:-
 sudo apk add --upgrade apk-tools@edge

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:-
 sudo apk add busybox-static apk-tools-static
 sudo apk.static update
 sudo apk.static upgrade --no-self-upgrade --available --simulate
 sudo apk.static upgrade --no-self-upgrade --available

I am not sure whether those steps were required to satisfy the error message: the error message disappeared only later, when I did
 sudo apk add --upgrade apk-tools@edge

Does that help? Could anyone clarify or assist please?
Fri, 2018-01-12 08:52
Amin
  • Amin's picture
  • Offline
  • Last seen: 2 months 2 weeks ago
  • Joined: 2018-01-10

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.

Log in or register to post comments