Pacman error: database is inconsistent: version mismatch on package qownnotes

Updates were always working fine but last sunday I got this error message while using normal update with pacman: “database is inconsistent: version mismatch on package qownnotes”.
I did a refresh pamac update --force-refresh.
Result:

 home_pbek_QOwnNotes_Arch_Extra is up to date
:: Starting full system upgrade...
error: home_pbek_QOwnNotes_Arch_Extra database is inconsistent: version mismatch on package qownnotes
error: home_pbek_QOwnNotes_Arch_Extra database is inconsistent: version mismatch on package qownnotes-debug
 there is nothing to do

version 26.9.2-1 is installed. That sunday it should have updated to 26.9.5-1 and today with 26.9.7-1 the error is still there. I am stuck on 26.9.2-1. Any advice how to solve this?
Also tried:

 sudo pacman -Syy qownnotes
[sudo] password for richard: 
:: Synchronising package databases...
 core                                                             150,7 KiB  71,3 KiB/s 00:02 [######################################################] 100%
 extra                                                              9,1 MiB  2,29 MiB/s 00:04 [######################################################] 100%
 multilib                                                          93,9 KiB  50,0 KiB/s 00:02 [######################################################] 100%
 home_pbek_QOwnNotes_Arch_Extra                                     2,5 KiB  11,8 KiB/s 00:00 [######################################################] 100%
error: home_pbek_QOwnNotes_Arch_Extra database is inconsistent: version mismatch on package qownnotes
error: home_pbek_QOwnNotes_Arch_Extra database is inconsistent: version mismatch on package qownnotes-debug
resolving dependencies...
looking for conflicting packages...

Packages (2) aspell-0.60.8.2-2  qownnotes-26.9.2-1

Total Download Size:    6,47 MiB
Total Installed Size:  37,17 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 qownnotes-26.9.7-1-x86_64                                          6,5 MiB  4,87 MiB/s 00:01 [######################################################] 100%
(2/2) checking keys in keyring                                                                [######################################################] 100%
downloading required keys...
:: Import PGP key A3BA514562A835DB, "i01-ch2d <abuild@i01-ch2d>"? [Y/n] y
(2/2) checking package integrity                                                              [######################################################] 100%
(2/2) loading package files                                                                   [######################################################] 100%
:: File /var/cache/pacman/pkg/qownnotes-26.9.7-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package).
Do you want to delete it? [Y/n] y
error: failed to commit transaction (invalid or corrupted package)
qownnotes-26.9.7-1-x86_64.pkg.tar.zst is invalid or corrupted
Errors occurred, no packages were upgraded.

Do you have advice how to solve this?

Note: I dont´t have AUR enabled and use the official repositories. Only for qownnotes there is a separate repo.

Just to be clear, this is unsupported on Manjaro

But you could try clearing your pacman cache. If the issue continues, you will likely need to interrogate the custom repo and determine why it has a version mismatch with what is already on your system.

Also your /var/log/pacman.log might give you more detail.

Thanks. I tried some things but the issue remains. /var/log/pacman.log is only showing entries for qownnotes-26.9.2-1 or lower.
Somehow pamac sees only 26.9.2-1 as available to install but when it contacts the repo it sees an higher version. I am considering deleting the link to the repo and go for a flatpak or AppImage version instead but then I still don´t understand what happened. It worked fine all the time, qownnotes gets lots of updates.

As already noted, this repository is unsupported by Manjaro.

Removing the foreign repo completely is a valid action to take, as no support will otherwise be offered. :eyes:


I note you previously had issues with QOwnNotes from the AUR:

Despite that the AUR is not officially supported by Manjaro (or Arch), it may yet be among your best options:


Personally, I might opt for the flatpak for relative ease of management; after removing the Arch repo and the application itself, simply:

flatpak install qownnotes

and to update it any time:

flatpak update

Regards.

Following the repo URL (https://download.opensuse.org/repositories/home) results in the following which is likely your problem. Follow it up with the maintainer or as was mentioned switch to flatpak.

Resource is no longer available!

The requested URL is no longer available on this server and there is no forwarding address. If you followed a link from a foreign page, please contact the author of this page.

If you think this is a server error, please contact the webmaster.

Error 404

download.opensuse.org
ApacheResource is no longer available!

That is not the full URL of the repo. It is https://download.opensuse.org/repositories/home:/pbek:/QOwnNotes/Arch_Extra/x86_64/.

This is not an error related to pacman or Manjaro. It is related to your 3rd-party repository.

Adding unsupported repositories and packages to a Manjaro installation always move the maintenance burden to the system administrator.

A 3rd-party repository may or may not match the Manjaro branch you are using.

Third party repositories are unsupported.

Your best option is to edit your /etc/pacman.conf and remove the reference to the third party repo.

cat /etc/pacman.conf

You will get something like - comment or remove the lines

[home_pbek_QOwnNotes_Arch_Extra]
SigLevel = ....
Server = ...

– See Unofficial user repositories - ArchWiki

Option 1

If you must use a repository targeting Arch Linux - for pulling qownnotes - then you must switch to Manjaro’s edge branch (unstable) and do a full system sync

sudo pacman-mirrors -aS unstable
sudo pacman -Syu

Preparation for Option 2 and 3

  1. ensure your system is up-to-date and have the necessary packages
    sudo pacman -Syu base-devel manjaro-chrootbuild
    
  2. clone the repo
    git clone https://aur.archlinux.org/qownnotes
    

Option 2

Build the custom package from AUR using chrootbuild

  1. assign the current Manjaro branch to a variable
    MYBRANCH=$(pacman-mirrors -G)
    
  2. build the package for your branch
    sudo chrootbuild -b $MYBRANCH -p qownnotes
    

This approach will ensure you get a clean build matching your current branch.

If you have not created a local .makepkg.conf you can install the package using

sudo pacman -U qownnotes*.pkg.tar.zst

Option 3

cd into the folder qownnotes and build the package using your running system libraries and install it

cd qownnotes
makepkg -iscC

Ongoing maintenance for Option 2 and 3

When ever you custom package creates problems, cd into the folder qownnotes and pull PKGBUILD changes, rebuild, optionally use the --force argument to avoid reinstalling the existing package.

cd qownnotes
git pull
makepkg -iscC [--force]

I stand corrected, something went wrong with opening it and I didn’t pay enough attention to the underlying link.

Thanks everyone for spending time on this and your elaborate suggestions. I really appreciate it considering that this is third party software and unsupported. This community/forum is amazing! :heart:
I have now chosen to use the AppImage and it runs fine. (the flatpak solution will consume a lot more diskspace).

UPDATE: there apparently was an issue with the specific repository that I was using.That should now be solved with QOwnNotes 26.9.8. See " Fixed the inconsistent Arch Linux package repository by preventing the legacy OBS target from publishing duplicate QOwnNotes packages (for #3743)"