Can't install Discourse

What type of hardware are you using: Bare Metal
What YunoHost version are you running: 12.1.15.1
What app is this about: Discourse 3.4.2~ynh2

Describe your issue

Can’t install the app.

Share relevant logs or error messages

https://paste.yunohost.org/raw/ilifuxoxup

Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - + [[ -n advancecomp brotli gifsicle jhead jpegoptim libapr1-dev libjemalloc-dev libreadline-dev libunwind-dev libxslt1-dev optipng pngcrush libbz2-dev librsvg2-dev postgresql-server-dev-all yarn  ]]
Info: DEBUG - + ynh_package_install advancecomp brotli gifsicle jhead jpegoptim libapr1-dev libjemalloc-dev libreadline-dev libunwind-dev libxslt1-dev optipng pngcrush libbz2-dev librsvg2-dev postgresql-server-dev-all yarn --dry-run
Info: DEBUG - + sed --quiet '/Reading state info/,$p'
Info: DEBUG - + ynh_apt --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install advancecomp brotli gifsicle jhead jpegoptim libapr1-dev libjemalloc-dev libreadline-dev libunwind-dev libxslt1-dev optipng pngcrush libbz2-dev librsvg2-dev postgresql-server-dev-all yarn --dry-run
Info: DEBUG - + ynh_wait_dpkg_free
Info: DEBUG - + grep -v 'fix-broken\|Reading state info'
Info: DEBUG - + return 0
Info: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install advancecomp brotli gifsicle jhead jpegoptim libapr1-dev libjemalloc-dev libreadline-dev libunwind-dev libxslt1-dev optipng pngcrush libbz2-dev librsvg2-dev postgresql-server-dev-all yarn --dry-run
Info: WARNING - The following packages have unmet dependencies:
Info: WARNING -  libapr1-dev : Depends: libapr1 (= 1.7.2-3+deb12u1) but it is not going to be installed
Info: WARNING -                Depends: libsctp-dev but it is not going to be installed
Info: WARNING -  librsvg2-dev : Depends: gir1.2-rsvg-2.0 (= 2.54.7+dfsg-1~deb12u1) but it is not going to be installed
Info: WARNING -                 Depends: libcairo2-dev (>= 1.2.0) but it is not going to be installed
Info: WARNING -                 Depends: libgdk-pixbuf-2.0-dev (>= 2.23.5-2) but it is not going to be installed
Info: WARNING -                 Depends: libglib2.0-dev (>= 2.50.0) but it is not going to be installed
Info: WARNING -  postgresql-common-dev : Breaks: postgresql-server-dev-all (< 269) but 248 is to be installed
Info: WARNING -  postgresql-server-dev-all : Depends: postgresql-common (= 248) but 281.pgdg120+1 is to be installed
Info: WARNING -                              Depends: postgresql-server-dev-15 but it is not going to be installed
Info: DEBUG - + ynh_die '--message=Unable to install dependencies'
Info: DEBUG - + ynh_exit_properly

Would you mind sharing the list of apps installed on your server? One of them depends on outdated PostgreSQL 11.

you can do so using the yunohost app list command btw

can you also provide what apt-cache rdepends postgresql | grep ynh-deps is saying?

yunohost app list|grep id:

    id: adventurelog
    id: code-server
    id: cyberchef
    id: diagramsnet
    id: dokuwiki
    id: drupal
    id: fail2ban-web
    id: glances
    id: homeassistant
    id: ifconfig-io
    id: immich
    id: it-tools
    id: jellyfin
    id: kavita
    id: librespeed
    id: localai
    id: mediawiki
    id: mongo-express
    id: navidrome
    id: netdata
    id: nextcloud
    id: ollama
    id: owncloud
    id: pgadmin
    id: photoprism
    id: phpmyadmin
    id: phpsysinfo
    id: piwigo
    id: pydio
    id: qr
    id: readeck
    id: samba
    id: scrutiny
    id: silverbullet
    id: snappymail
    id: stirling-pdf
    id: syncthing
    id: tooljet
    id: traccar
    id: unattended_upgrades
    id: webmin
    id: wordpress
    id: xwiki
apt-cache rdepends postgresql | grep ynh-deps

  xwiki-ynh-deps
  traccar-ynh-deps
  tooljet-ynh-deps
  readeck-ynh-deps
  pgadmin-ynh-deps
  immich-ynh-deps
  adventurelog-ynh-deps
1 Like

Thanks!

From what i see, all of your apps should be fine

Are they all up to date?

What is the result of yunohost tools migrations state?

Yes. And all of them fresh installed and working, on a fresh installation of YunoHost 12.1.15.1.

yunohost tools migrations state

migrations:
  0027_migrate_to_bookworm: skipped
  0028_delete_legacy_xmpp_permission: skipped
  0029_postgresql_13_to_15: skipped
  0030_rebuild_python_venv_in_bookworm: skipped
  0031_terms_of_services: skipped
  0032_firewall_config: skipped
  0033_rework_permission_infos: skipped
  0034_fix_missing_admins_aliases: skipped
  0035_fix_apps_nodejs_version: skipped

It says postgresql-common-dev will break postgresql-server-dev-all which got me thinking: how exactly did you install base Debian for YunoHost?

I’m asking because postgresql-common-dev is available in Trixie+, which is an unsupported version.

What’s the output of uname -a? What about lsb_release -a?

I did a fresh installation of Debian 12 Netinstaller, a basic installation without anything except XFCE.

Everything related to Postgres was created using yunohost app install.

uname -a

Linux ynh.maindomain.tld 6.1.0-38-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.147-1 (2025-08-02) x86_64 GNU/Linux


lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm
1 Like

Hello, I am experiencing the exact same issue as described in this thread.

My Yunohost installation is failing when I try to install the Discourse app due to a dependency conflict with PostgreSQL.

Here is a summary of my problem:

  • Yunohost Version: (12.1.17.1 (stable))
  • App Version: Discourse 3.4.2~ynh2
  • Error: The apt installation process is failing because of a version conflict with postgresql-common.

My system has a newer version of postgresql-common installed, which seems to be from an external repository, while the Discourse app’s required postgresql-server-dev-all package expects an older, specific version.

Here are the relevant outputs from my terminal that clearly show the conflict:

apt-cache show postgresql-server-dev-all output:

Package: postgresql-server-dev-all Version: 248 Depends: make:any, postgresql-common (= 248), postgresql-server-dev-15

dpkg -l | grep postgresql-common output:

ii postgresql-common 278.pgdg120+1 all PostgreSQL database-cluster manager

ii postgresql-common-dev 278.pgdg120+1 all extension build tool for multiple PostgreSQL versions

I have already checked /etc/apt/sources.list and all files in /etc/apt/sources.list.d/, but I can’t find any file with the pgdg repository configured.

Any advice on how to resolve this specific dependency conflict would be greatly appreciated. Thanks!

root@uwu:~# uname -a
Linux uwu.noho.st 6.1.0-38-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.147-1 (2025-08-02) x86_64 GNU/Linux
root@uwu:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

During my tests to convert the app to helpers2.1 I had a similar issue which I resolved by removing postgresql-server-dev-all from the manifest.

You can try to install my branch (see pr - upgrade from an older version will probabily fail but a new instance should work).

It will eventually be merged so you can also wait for it to reach the master branch

2 Likes

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