[4.1.0.23] Cannot install packages into target

REPRODUCIBILITY (% or how often): 100

I cannot install any packages into the target http://releases.sailfishos.org/sdk/targets/Sailfish_OS-4.1.0.23-Sailfish_SDK_Target-aarch64.tar.7z

Below, nano is used for demo :slight_smile:

$ sb2 -t SailfishOS-4.1.0.23-aarch64 -R zypper in nano
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  nano

1 new package to install.
Overall download size: 395.6 KiB. Already cached: 0 B. After the operation, additional 395.6 KiB will be used.
Continue? [y/n/v/...? shows all options] (y): 
Retrieving package nano-2.8.5+git2-1.3.1.jolla.aarch64                                  (1/1), 395.6 KiB (395.6 KiB unpacked)
Retrieving: nano-2.8.5+git2-1.3.1.jolla.aarch64.rpm ...................................................................[done]

Checking for file conflicts: ..........................................................................................[done]
(1/1) Installing: nano-2.8.5+git2-1.3.1.jolla.aarch64 ................................................................[error]
Installation of nano-2.8.5+git2-1.3.1.jolla.aarch64 failed:
Error: Subprocess failed. Error: RPM failed: error: db4 error(-30971) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db4 -  (-30971)
error: cannot open Packages database in /var/lib/rpm
4 Likes

Do you need to

devel-su pkcon refresh

on the target before? Yes I know this is for on device activities (like storeman), but… Or crazy permissions on /var/lib/rpm

As we don’t have pkcon in that environment, zypper ref didn’t help, unfortunately.

Ooops, i forgot about this thread.
I had the same issue yesterday:

(Please keep the bug report)

2 Likes

Thanks, that fixed it! Keeping the report, as requested.

1 Like

Thanks for the report. We have already fixed it for the upcoming SDK release. In the meantime, please use workaround mentioned above.

3 Likes

Thanks! Marking workaround as solution and looking forward to the release of the proper bugfix

As a side note, I managed to fix with rpm --rebuilddb - sorry I’m late to the party :slight_smile:

2 Likes