Skip to content
Contents
GuidesOpenWrt

OpenWrt jq-full cannot load libonig.so.5: check the symlink target

If apk lists oniguruma5 as installed but the loader cannot open libonig.so.5, verify the file the symlink points to. A package record alone does not prove the target exists. Copy the exact library name from the error before checking the following.

If apk lists oniguruma5 as installed but the loader cannot open libonig.so.5, verify the file the symlink points to. A package record alone does not prove the target exists. Copy the exact library name from the error before checking the following.

Compare the package version, symlink and target

ubus call system board | jsonfilter -e '@.release.description' -e '@.release.target'
apk list --installed oniguruma5 jq-full
ls -l /usr/lib/libonig.so.5*
readlink /usr/lib/libonig.so.5
test -f /usr/lib/libonig.so.5 && echo target-present

Some x86/64 installations on 25.12.2 and 25.12.3 had the symlink without its target. Our 25.12.6 x86/64 guest had oniguruma5 6.9.10-r4 and jq-full 1.8.1-r2, with both the symlink and libonig.so.5.5.0 present. Other revisions can name a different target; use your own readlink output.

Exercise the regex function

printf '"lab54"\n' | jq 'test("^lab[0-9]+$")'

The target file exists and the jq regex test on the same guest returns true

If the target is missing, inspect the manifest with apk info -L oniguruma5 and record the firmware and package revisions. Check the matching release and architecture for a package containing the real library. Renaming an unrelated ABI library to fit the link can break consumers. If the target exists but the regex still fails, identify the jq executable and its package and save the new first error. Test any replacement on a spare system and keep the production firmware and configuration available.

Why apk replaces jq with jq-full on OpenWrt. Understanding virtual providers

Explore hardware

Comments