# Paperless-ngx libpq Version issue \[solved\]

**URL:** <https://forum.yunohost.org/t/paperless-ngx-libpq-version-issue-solved/42071>\
**Category:** Support\
**Tags:** bug, english\
**Created:** [April 15, 2026, 8:15am UTC](https://forum.yunohost.org/t/paperless-ngx-libpq-version-issue-solved/42071 "2026-04-15T08:15:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdornseif](https://forum.yunohost.org/user_avatar/forum.yunohost.org/mdornseif/32/12727_2.png) [@mdornseif](https://forum.yunohost.org/u/mdornseif)\
**Post date:** [April 15, 2026, 8:15am UTC](https://forum.yunohost.org/t/paperless-ngx-libpq-version-issue-solved/42071/1 "2026-04-15T08:15:30Z")

</div>

**What type of hardware are you using** : VPS bought online  
**What YunoHost version are you running** : 12.1.39  
**How are you able to access your server** : SSH  
**Are you in a special context or did you perform specific tweaking on your YunoHost instance ?** : some directories are mounted from s3 buckets. I assume this is not the problem.

### Describe your issue

Hello and thanks for this great software!

I noticed the paperless-ngx services where not running. There was an error with traceback along the lines of “requires libpq from PostgreSQL 16.0 on the client; version 15.15 available instead”.  
I updated system packages via yunohost web admin. Then I tried to update paperless-ngx which failed. I tried again at the command line. Logs appended.

### Share relevant logs or error messages

$ sudo yunohost app upgrade paperless-ngx  
Info: Now upgrading paperless-ngx…  
Info: Creating a safety backup prior to the upgrade  
Info: Collecting files to be backed up for paperless-ngx…  
Info: Declaring files to be backed up…  
Info: /home/yunohost.app/paperless-ngx will not be saved, because ‘BACKUP\_CORE\_ONLY’ is set.  
Info: Backing up the MySQL database…  
Info: Backup script completed for paperless-ngx. (YunoHost will then actually copy those files to the archive).  
Info: Creating a backup archive from the collected files…  
Info: The archive will contain about 1.5GB of data.  
Success! Backup created: paperless-ngx-pre-upgrade2  
Info: Backup paperless-ngx-pre-upgrade1 was deleted because it is replaced by a newer backup paperless-ngx-pre-upgrade2  
Info: Updating sources…  
Info: Updating system\_user…  
Info: Updating install\_dir…  
Info: Updating data\_dir…  
Info: Updating permissions…  
Info: Updating ports…  
Info: Updating apt…  
Info: Updating database…  
Info: [+…] \> Stopping paperless-ngx’s systemd service…  
Info: [#++…] \> Ensuring downward compatibility…  
Info: [###+…] \> Upgrading source files…  
Info: [####++…] \> Upgrading NGINX web server configuration…  
Info: [######+…] \> Installing Python dependencies…  
Info: [#######++…] \> Updating configuration…  
Info: [#########+…] \> Setting up the database…  
Warning: Traceback (most recent call last):  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/backends/base/base.py”, line 279, in ensure\_connection  
Warning: self.connect()  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/utils/asyncio.py”, line 26, in inner  
Warning: return func(\*args, \*\*kwargs)  
Warning: ^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/backends/base/base.py”, line 256, in connect  
Warning: self.connection = self.get\_new\_connection(conn\_params)  
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/utils/asyncio.py”, line 26, in inner  
Warning: return func(\*args, \*\*kwargs)  
Warning: ^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/backends/postgresql/base.py”, line 332, in get\_new\_connection  
Warning: connection = self.Database.connect(\*\*conn\_params)  
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/psycopg/connection.py”, line 131, in connect  
Warning: and rv.pgconn.used\_gssapi  
Warning: ^^^^^^^^^^^^^^^^^^^^^  
Warning: File “psycopg\_c/pq/pgconn.pyx”, line 224, in psycopg\_c.pq.PGconn.used\_gssapi. **get**  
Warning: File “psycopg\_c/pq/pgconn.pyx”, line 38, in psycopg\_c.pq.\_check\_supported  
Warning: psycopg.NotSupportedError: PQconnectionUsedGSSAPI requires libpq from PostgreSQL 16.0 on the client; version 15.15 available instead  
Warning: The above exception was the direct cause of the following exception:  
Warning: Traceback (most recent call last):  
Warning: File “/var/www/paperless-ngx/src/manage.py”, line 10, in   
Warning: execute\_from\_command\_line(sys.argv)  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/core/management/ **init**.py”, line 442, in execute\_from\_command\_line  
Warning: utility.execute()  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/core/management/ **init**.py”, line 436, in execute  
Warning: self.fetch\_command(subcommand).run\_from\_argv(self.argv)  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/core/management/base.py”, line 416, in run\_from\_argv  
Warning: self.execute(\*args, \*\*cmd\_options)  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/core/management/base.py”, line 457, in execute  
Warning: self.check(\*\*check\_kwargs)  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/core/management/base.py”, line 492, in check  
Warning: all\_issues = checks.run\_checks(  
Warning: ^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/core/checks/registry.py”, line 89, in run\_checks  
Warning: new\_errors = check(app\_configs=app\_configs, databases=databases)  
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/src/paperless/checks.py”, line 206, in audit\_log\_check  
Warning: all\_tables = db\_conn.introspection.table\_names()  
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/backends/base/introspection.py”, line 56, in table\_names  
Warning: with self.connection.cursor() as cursor:  
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/utils/asyncio.py”, line 26, in inner  
Warning: return func(\*args, \*\*kwargs)  
Warning: ^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/backends/base/base.py”, line 320, in cursor  
Warning: return self.\_cursor()  
Warning: ^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/backends/base/base.py”, line 296, in \_cursor  
Warning: self.ensure\_connection()  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/utils/asyncio.py”, line 26, in inner  
Warning: return func(\*args, \*\*kwargs)  
Warning: ^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/backends/base/base.py”, line 278, in ensure\_connection  
Warning: with self.wrap\_database\_errors:  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/utils.py”, line 91, in **exit**  
Warning: raise dj\_exc\_value.with\_traceback(traceback) from exc\_value  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/backends/base/base.py”, line 279, in ensure\_connection  
Warning: self.connect()  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/utils/asyncio.py”, line 26, in inner  
Warning: return func(\*args, \*\*kwargs)  
Warning: ^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/backends/base/base.py”, line 256, in connect  
Warning: self.connection = self.get\_new\_connection(conn\_params)  
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/utils/asyncio.py”, line 26, in inner  
Warning: return func(\*args, \*\*kwargs)  
Warning: ^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/backends/postgresql/base.py”, line 332, in get\_new\_connection  
Warning: connection = self.Database.connect(\*\*conn\_params)  
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
Warning: File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/psycopg/connection.py”, line 131, in connect  
Warning: and rv.pgconn.used\_gssapi  
Warning: ^^^^^^^^^^^^^^^^^^^^^  
Warning: File “psycopg\_c/pq/pgconn.pyx”, line 224, in psycopg\_c.pq.PGconn.used\_gssapi. **get**  
Warning: File “psycopg\_c/pq/pgconn.pyx”, line 38, in psycopg\_c.pq.\_check\_supported  
Warning: django.db.utils.NotSupportedError: PQconnectionUsedGSSAPI requires libpq from PostgreSQL 16.0 on the client; version 15.15 available instead  
Error: Failed to upgrade paperless-ngx: An error occurred inside the app upgrade script  
Info: The operation ‘Upgrade the ‘paperless-ngx’ app’ could not be completed. Please share the full log of this operation using the command ‘yunohost log share 20260415-075143-app\_upgrade-paperless-ngx’ to get help  
Warning: Here’s an extract of the logs before the crash. It might help debugging the error:  
Info: WARNING - self.connect()  
Info: WARNING - File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/utils/asyncio.py”, line 26, in inner  
Info: WARNING - return func(\*args, \*\*kwargs)  
Info: WARNING - ^^^^^^^^^^^^^^^^^^^^^  
Info: WARNING - File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/backends/base/base.py”, line 256, in connect  
Info: WARNING - self.connection = self.get\_new\_connection(conn\_params)  
Info: WARNING - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
Info: WARNING - File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/utils/asyncio.py”, line 26, in inner  
Info: WARNING - return func(\*args, \*\*kwargs)  
Info: WARNING - ^^^^^^^^^^^^^^^^^^^^^  
Info: WARNING - File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/django/db/backends/postgresql/base.py”, line 332, in get\_new\_connection  
Info: WARNING - connection = self.Database.connect(\*\*conn\_params)  
Info: WARNING - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
Info: WARNING - File “/var/www/paperless-ngx/venv/lib/python3.11/site-packages/psycopg/connection.py”, line 131, in connect  
Info: WARNING - and rv.pgconn.used\_gssapi  
Info: WARNING - ^^^^^^^^^^^^^^^^^^^^^  
Info: WARNING - File “psycopg\_c/pq/pgconn.pyx”, line 224, in psycopg\_c.pq.PGconn.used\_gssapi. **get**  
Info: WARNING - File “psycopg\_c/pq/pgconn.pyx”, line 38, in psycopg\_c.pq.\_check\_supported  
Info: WARNING - django.db.utils.NotSupportedError: PQconnectionUsedGSSAPI requires libpq from PostgreSQL 16.0 on the client; version 15.15 available instead  
Info: DEBUG - + ynh\_exit\_properly  
Warning: Upgrade failed … attempting to restore the safety backup (Yunohost first need to remove the app for this) …  
Info: Removing paperless-ngx…  
Info: [####################] \> Removal of paperless-ngx completed  
Info: Deprovisioning database…  
Info: Deprovisioning apt…  
Info: Deprovisioning ports…  
Info: Deprovisioning permissions…  
Info: Deprovisioning data\_dir…  
Info: Deprovisioning install\_dir…  
Info: Deprovisioning system\_user…  
Info: Deprovisioning sources…  
Success! paperless-ngx uninstalled  
Info: Preparing archive for restoration…  
Info: Restoring paperless-ngx…  
Info: Provisioning sources…  
Info: Provisioning system\_user…  
Info: Provisioning install\_dir…  
Info: Provisioning data\_dir…  
Info: Provisioning permissions…  
Info: Provisioning ports…  
Info: Provisioning apt…  
Info: Provisioning database…  
Info: [+…] \> Loading additionnal settings…  
Info: [#++…] \> Restoring the app main directory…  
Info: [###+…] \> Restoring the data directory…  
Info: Skipping /home/yunohost.app/paperless-ngx which doesn’t exists in the archive, probably because restoring from a safety-backup-before-upgrade

---

<div class="post-metadata">

**Author:** ![mdornseif](https://forum.yunohost.org/user_avatar/forum.yunohost.org/mdornseif/32/12727_2.png) [@mdornseif](https://forum.yunohost.org/u/mdornseif)\
**Post date:** [April 15, 2026, 8:31am UTC](https://forum.yunohost.org/t/paperless-ngx-libpq-version-issue-solved/42071/2 "2026-04-15T08:31:00Z")

</div>

I forgot to mention: “The archive will contain about 1.5GB of data.” seems awfully much to me.

–max

---

<div class="post-metadata">

**Author:** ![mdornseif](https://forum.yunohost.org/user_avatar/forum.yunohost.org/mdornseif/32/12727_2.png) [@mdornseif](https://forum.yunohost.org/u/mdornseif)\
**Post date:** [April 15, 2026, 8:34am UTC](https://forum.yunohost.org/t/paperless-ngx-libpq-version-issue-solved/42071/3 "2026-04-15T08:34:34Z")

</div>

And in case the mounting is suspected:

```bash
$ mount
...
garage:paperless-in on /home/yunohost.app/paperless-ngx/consume type fuse.rclone (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,_netdev)
garage:musik-sortiert on /home/yunohost.multimedia/share/musikSortiert type fuse.rclone (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,_netdev)
garage:paperless-media on /home/yunohost.app/paperless-ngx/media type fuse.rclone (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,_netdev)
garage:archivebox on /home/yunohost.app/archivebox/archive type fuse.rclone (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,_netdev)
garage:bilder-immich on /home/yunohost.app/immich type fuse.rclone (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,_netdev)

```

paperless-media is 2.2 GB in size. Garage is not the yunohost service garage.

---

<div class="post-metadata">

**Author:** ![mdornseif](https://forum.yunohost.org/user_avatar/forum.yunohost.org/mdornseif/32/12727_2.png) [@mdornseif](https://forum.yunohost.org/u/mdornseif)\
**Post date:** [April 21, 2026, 5:10am UTC](https://forum.yunohost.org/t/paperless-ngx-libpq-version-issue-solved/42071/4 "2026-04-21T05:10:32Z")

</div>

So far installing older Versions did not seem to help:

`% sudo yunohost app upgrade paperless-ngx -u ` [https://github.com/YunoHost-Apps/paperless-ngx\_ynh/tree/4c0a1e2ec82968aafaec98b938580fcf554ce0ff`](https://github.com/YunoHost-Apps/paperless-ngx_ynh/tree/4c0a1e2ec82968aafaec98b938580fcf554ce0ff%60) --no-safety-backup --continue-on-failure`

still fails.

---

<div class="post-metadata">

**Author:** ![mdornseif](https://forum.yunohost.org/user_avatar/forum.yunohost.org/mdornseif/32/12727_2.png) [@mdornseif](https://forum.yunohost.org/u/mdornseif)\
**Post date:** [April 27, 2026, 9:13am UTC](https://forum.yunohost.org/t/paperless-ngx-libpq-version-issue-solved/42071/5 "2026-04-27T09:13:41Z")

</div>

It seems the whhel was linked to a stalle Postgress library.

So I rebuild:

```bash
$ sudo yunohost app shell paperless-ngx

$ paperless-ngx@emil:~/src$ /var/www/paperless-ngx/venv/bin/pip install --force-reinstall --no-binary --no-cache-dir :all: psycopg==3.2.12 psycopg-c==3.2.12 

```

did the job.

---

<div class="post-metadata">

**Author:** ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)\
**Post date:** [May 27, 2026, 9:13am UTC](https://forum.yunohost.org/t/paperless-ngx-libpq-version-issue-solved/42071/6 "2026-05-27T09:13:48Z")

</div>

Closed on May 27, 2026, 9:13am UTC

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