OPKG package management issue

Hi,

I am trying to install .ipk with opkg in yocto.

If i run below command

opkg install *.ipk

I am getting the below error:-

Collected errors:

  • opkg_conf_load: Could not create lock file /var/lib/opkg/lock: No such file or directory.

I did some research and followed this link

http://wiki.hioproject.org/index.php?title=Yocto:_Opkg_Package_Management_System_Set_Up

I came to know that one should add in the conf/local.conf

EXTRA_IMAGE_FEATURES = "package-management"

IMAGE_INSTALL_append = " opkg "

PACKAGE_CLASSES = "package_ipk"

Even though i am getting the same error.

“/var/lib/opkg/” is existed in my image build directory, but after installing the image to the target device the “/var/lib/opkg/” is not appearing.

I am guessing that, the disappearance of the /var/lib/opkg folder may be causing the opkg error.

Can anybody please help me on this problem.

Thank you,
Abhishek

Hi,

It might be because the rootfs is read-only.
There is an overlay mechanism that is already in place for /etc and /data.
You could update it to overlay /var as well by updating the file ‘mount_unionfs’