Hello,
I am trying to update *.deb package with a Raspberry Pi3(application update) using mender client. I followed steps mentioned in “How to update .deb package with a Raspberry Pi 3” but unfortunately it’s not behaving as expected and it throws an error – “No such file or directory” as mentioned below in highlighted text.
2021-02-18 11:00:41 +0000 UTC info: Running Mender client version: 2.5.0
2021-02-18 11:00:42 +0000 UTC info: State transition: update-fetch [Download_Enter] → update-store [Download_Enter]
2021-02-18 11:00:42 +0000 UTC info: No public key was provided for authenticating the artifact
2021-02-18 11:00:43 +0000 UTC info: State transition: update-store [Download_Enter] → update-after-store [Download_Leave]
2021-02-18 11:00:43 +0000 UTC info: State transition: update-after-store [Download_Leave] → update-install [ArtifactInstall]
2021-02-18 11:00:43 +0000 UTC info: Update module output: dpkg: error: unable to access the dpkg database directory /var/lib/dpkg: No such file or directory
2021-02-18 11:00:43 +0000 UTC error: Update module terminated abnormally: exit status 2
2021-02-18 11:00:43 +0000 UTC error: transient error: Update module terminated abnormally: exit status 2
2021-02-18 11:00:43 +0000 UTC info: State transition: update-install [ArtifactInstall] → update-error [ArtifactFailure]
2021-02-18 11:00:43 +0000 UTC info: State transition: update-error [ArtifactFailure] → cleanup [Error]
2021-02-18 11:00:43 +0000 UTC info: State transition: cleanup [Error] → update-status-report [none]
*application .deb update
------------------------------------
ARTIFACT_NAME=“my-rasp-update-1.0”
DEVICE_TYPE=“raspberrypi3”
OUTPUT_PATH=“my-rasp-update-1.0.mender”
PACKAGES=“weavedconnectd_1.3-07m_armhf.deb”
mender-artifact write module-image -T deb -n {ARTIFACT_NAME} -t {DEVICE_TYPE} -o {OUTPUT_PATH} -f (echo “$PACKAGES” | sed -e ‘s/ / -f /g’)
Changes in local.conf in my build folder
PACKAGE_CLASSES = “package_deb”
IMAGE_INSTALL_append += " apt dpkg "
With the local.conf changes in my build, /usr/bin had the dpkg installed, but never generated /var/lib/dpkg folder.
To overcome this error “2021-02-18 11:00:43 +0000 UTC info: Update module output: dpkg: error: unable to access the dpkg database directory /var/lib/dpkg: No such file or directory”, I copied the /var/lib/dpkg manually to my flashed mender binary. After this change when I try to do an update, previous issue is gone but I encountered different set of issues as highlighted below.
2021-02-18 17:39:33 +0000 UTC info: Running Mender client version: 2.5.0
2021-02-18 17:39:34 +0000 UTC info: State transition: update-fetch [Download_Enter] → update-store [Download_Enter]
2021-02-18 17:39:34 +0000 UTC info: No public key was provided for authenticating the artifact
2021-02-18 17:39:35 +0000 UTC info: State transition: update-store [Download_Enter] → update-after-store [Download_Leave]
2021-02-18 17:39:35 +0000 UTC info: State transition: update-after-store [Download_Leave] → update-install [ArtifactInstall]
2021-02-18 17:39:35 +0000 UTC info: Update module output: Selecting previously unselected package weavedconnectd.
2021-02-18 17:39:36 +0000 UTC info: Update module output: (Reading database … 4865 files and directories currently installed.)
2021-02-18 17:39:36 +0000 UTC info: Update module output: Preparing to unpack …/weavedconnectd_1.3-07m_armhf.deb …
2021-02-18 17:39:36 +0000 UTC info: Update module output: Unpacking weavedconnectd (1.3-07m) …
2021-02-18 17:39:36 +0000 UTC info: Update module output: dpkg: error processing archive /var/lib/mender/modules/v3/payloads/0000/tree/files/weavedconnectd_1.3-07m_armhf.deb (–install):
2021-02-18 17:39:36 +0000 UTC info: Update module output: unable to clean up mess surrounding ‘./usr/bin/weavedconnectd.pi’ before installing another version: Read-only file systemcd .
2021-02-18 17:39:36 +0000 UTC info: Update module output: dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
2021-02-18 17:39:36 +0000 UTC info: Update module output: Errors were encountered while processing:
2021-02-18 17:39:36 +0000 UTC info: Update module output: /var/lib/mender/modules/v3/payloads/0000/tree/files/weavedconnectd_1.3-07m_armhf.deb
2021-02-18 17:39:36 +0000 UTC error: Update module terminated abnormally: exit status 1
2021-02-18 17:39:36 +0000 UTC error: transient error: Update module terminated abnormally: exit status 1
2021-02-18 17:39:36 +0000 UTC info: State transition: update-install [ArtifactInstall] → update-error [ArtifactFailure]
2021-02-18 17:39:36 +0000 UTC info: State transition: update-error [ArtifactFailure] → cleanup [Error]
2021-02-18 17:39:36 +0000 UTC info: State transition: cleanup [Error] → update-status-report [none]
Just to ensure if the way of execution is correct, I tried executing the below command(dpkg -i /mnt/mender-client_2.5.0-1_armhf.deb) as seen in the attached image “deb_error.png”. I am just wondering whether I missed any steps that are required for Application update with mender client. It would be great if you could help us in resolving this issue.