Dependency problems with Paperless (and Davis?)

What app is this about, and its version: Paperless-ngx, possibly in combination with Davis
What YunoHost version are you running: 12.1.38
What type of hardware are you using: VPS bought online

Describe your issue

I tried upgrading Paperless-ngx from 2.19.3~ynh1 to 2.20.3~ynh2, which failed because of me incorrectly setting and not installing an OCR language (I guess?)

After that, YunoHost tried to restore from backup, which also failed, as far as I can tell because of dependency problems. Specifically, because Paperless-ngx depends on libpg-dev, which depends on libpq5=15.14-0+deb12u1 , but for some reason I had postgresql-client-15=15.15-1.pgdg12+1 installed which depended on libpq5 (>= 15.15), so those were in conflict.

What seems to have helped was downgrading postgresql-client-15 to 15.14-0+deb12u1, and after that I could downgrade libpq5 to 15.14-0+deb12u1 too.

Once that was done, installing Paperless-ngx worked fine. (At least, I got through the apt step, it’s stuck on compiling Ghostscript now, and I really should head to bed. Will update tomorrow, if I remember.) Update: Install and restore worked fine, hooray!

What helped me find this was trying to manually downgrade/install sudo apt install libpq5=15.14-0+deb12u1, which made apt want to uninstall a few packages, including postgresql-client-15:

felix@ynh:~$ sudo apt install libpq5=15.14-0+deb12u1
[sudo] password for felix: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libllvm19 libsensors-config libsensors5 libz3-4 libzip4 php8.4 php8.4-cli php8.4-curl php8.4-fpm php8.4-gd php8.4-intl php8.4-ldap php8.4-opcache php8.4-pgsql
  php8.4-xml php8.4-zip postgresql-client-common postgresql-common sysstat
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  davis-ynh-deps postgresql postgresql-15 postgresql-15-pgvector postgresql-client-15
The following packages will be DOWNGRADED:
  libpq5
0 upgraded, 0 newly installed, 1 downgraded, 5 to remove and 0 not upgraded.
Need to get 0 B/194 kB of archives.
After this operation, 61.3 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

This, and messing around with apt show -a ... (which shows all available versions of packages, I think) eventually brought me to my solution.
davis-ynh-deps being among the packages apt wanted to uninstall gives me the slight suspicion that Davis might somehow be involved, maybe it depends on postgresql-client-15 in a way that caused the too new version to be installed, but I’m not sure.

Share relevant logs or error messages

Here’s an install log: https://paste.yunohost.org/raw/soxoqilema
And the restore log: https://paste.yunohost.org/raw/fudatirozu

2026-01-05 01:11:04,444: WARNING -  libpq-dev : Depends: libpq5 (= 15.14-0+deb12u1) but 18.1-1.pgdg12+2 is to be installed
2026-01-05 01:11:04,445: WARNING -              Depends: libssl-dev but it is not going to be installed

And the log from the upgrade that threw me into this mess in the first place: https://paste.yunohost.org/raw/vixohucako

2026-01-05 00:54:02,024: WARNING - ?: The selected ocr language deu is not installed. Paperless cannot OCR your documents without it. Please fix PAPERLESS_OCR_LANGUAGE.
2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.