opkg should use /var/lib/opkg, not /usr/lib/opkg as /usr/lib can be readonly on an installed system.
Fixed with commit 1d0757f16beb31551733d9d755d72337ccda9642 opkg: use var for state files, not libdir