APK - Unable to read database: No such file or directory

Hi,

so I build apk-openssl and I am getting while trying to run apk update

ERROR: Unable to read database: No such file or directory
ERROR: Failed to open apk database: No such file or directory

Is there anything I need to do to create the database? /lib/apk is empty ... any pointers to documentation on how to setup apk?

thank you

i can confirm same error with apk-openssl on wrt1900v1. for detail - i diownloaded 24.10-snapshot from the download server, then used opkg to install openssl support and my usual add-ons. then installed apk-openssl.,

If I force the build with APK by default it attempts to create the database but fails with

ERROR: System state may be inconsistent: failed to write database: No buffer space available
1 error; 108 MiB in 523 packages

Simply installing an apk-tools package does not build the package databases. You need to do a lot of work to get those, so if you want to test apk, I'd suggest you install a main snapshot, since it contains all the necessary files already:

$ find /lib/apk/
/lib/apk/
/lib/apk/db
/lib/apk/db/installed
/lib/apk/db/scripts.tar
/lib/apk/db/triggers
/lib/apk/db/installed.adb
/lib/apk/packages
/lib/apk/packages/apk-mbedtls.list
/lib/apk/packages/attendedsysupgrade-common.list
/lib/apk/packages/base-files.conffiles
/lib/apk/packages/base-files.conffiles_static
/lib/apk/packages/base-files.list
/lib/apk/packages/bind-dig.list
/lib/apk/packages/bind-libs.list
/lib/apk/packages/blkid.list
/lib/apk/packages/block-mount.conffiles
/lib/apk/packages/block-mount.list
...

That's a bug in apk, which just got fixed yesterday: https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/11038

Not sure when it will get into OpenWrt...

1 Like

ok I thought that the announcement that APK was the default meant it would force the build of the db . However, if I do force I get the error "failed to write the database" ... any place where I can increase the buffer / size ...

You're right, my bad (replying on 3-4 threads at once is probably a bad idea :thinking:). Setting the CONFIG_USE_APK=y does create all the requisite database components, I was thinking that you had a working opkg build and did opkg install apk-xxx, which is what doesn't work.

If you can figure out which package you're using that has the long description, you might be able to just hack it down in the package's Makefile and work past the bug that way.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.