failed to write database: No buffer space available
I am reporting for apk-tools ( d9c24813 ) which currently being use in OpenWrt as the default package manager, currently apk is being used as follow :
ln -s /home/user/works/openwrt/bin/targets/x86/64-glibc/packages/*.apk /home/user/works/openwrt/staging_dir/packages/x86; ln -s /home/user/works/openwrt/bin/packages/x86_64/base/*.apk /home/user/works/openwrt/staging_dir/packages/x86; ln -s /home/user/works/openwrt/bin/packages/x86_64/luci/*.apk /home/user/works/openwrt/staging_dir/packages/x86; ln -s /home/user/works/openwrt/bin/packages/x86_64/packages/*.apk /home/user/works/openwrt/staging_dir/packages/x86; ln -s /home/user/works/openwrt/bin/packages/x86_64/routing/*.apk /home/user/works/openwrt/staging_dir/packages/x86; ln -s /home/user/works/openwrt/bin/packages/x86_64/telephony/*.apk /home/user/works/openwrt/staging_dir/packages/x86;
(cd /home/user/works/openwrt/staging_dir/packages/x86 && /home/user/works/openwrt/staging_dir/host/bin/apk mkndx \
--root /home/user/works/openwrt \
--keys-dir /home/user/works/openwrt \
--sign /home/user/works/openwrt/private-key.pem \
--output packages.adb \
*.apk; \
)
Index has 4282 packages (of which 4282 are new)
find /home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/root-x86 -type d | xargs -r chmod 0755
rm -rf /home/user/works/openwrt/build_dir/target-x86_64_glibc_custom/root-x86 /home/user/works/openwrt/build_dir/target-x86_64_glibc_custom/root.orig-x86
mkdir -p /home/user/works/openwrt/build_dir/target-x86_64_glibc_custom/root-x86/tmp
IPKG_INSTROOT=/home/user/works/openwrt/build_dir/target-x86_64_glibc_custom/root-x86 /home/user/works/openwrt/staging_dir/host/bin/fakeroot /home/user/works/openwrt/staging_dir/host/bin/apk --root /home/user/works/openwrt/build_dir/target-x86_64_glibc_custom/root-x86 --keys-dir /home/user/works/openwrt --no-logfile --preserve-env add --no-cache --initdb --no-scripts --arch x86_64 \
--repositories-file /dev/zero --repository file:///home/user/works/openwrt/staging_dir/packages/x86/packages.adb \
$(cat /home/user/works/openwrt/tmp/apk_install_list)
( 1/2353) Installing libgcc1 (14.2.0-r4)
( 2/2353) Installing libc (2.41-r4)
( 3/2353) Installing kernel (6.6.60~c2b6b88ccf1c7d34a56a9dc1c9e6a869-r1)
And the problems is at the end of Installing :
(2352/2353) Installing zoneinfo-all (2024b-r1)
(2353/2353) Installing zstd (1.5.6-r1)
ERROR: System state may be inconsistent: failed to write database: No buffer space available
1 error; 2704 MiB in 2353 packages
make[2]: *** [package/Makefile:99: package/install] Error 1
Edited by Aditya Nugraha