Installation prob - Discourse 1/ swap file 2/ dependencies

Bonjour,
Je me retrouve avec un message d’erreur lors de l’installation de Discourse :

2020-10-06 18:53:21,350: INFO - [....................] > Validating installation parameters...
2020-10-06 18:53:21,652: DEBUG - + check_memory_requirements
2020-10-06 18:53:21,652: DEBUG - + is_swap_present
2020-10-06 18:53:21,652: DEBUG - ++ awk '/^SwapTotal:/{print $2}' /proc/meminfo
2020-10-06 18:53:21,653: DEBUG - + '[' 0 -gt 0 ']'
2020-10-06 18:53:21,653: DEBUG - + ynh_die '--message=You must have a swap partition in order to install and use this application'
2020-10-06 18:53:21,754: DEBUG - + ret_code=1
2020-10-06 18:53:21,755: WARNING - You must have a swap partition in order to install and use this application
2020-10-06 18:53:21,755: DEBUG - + echo 'You must have a swap partition in order to install and use this application'

Après une recherche sur le forum je n’ai pas trouvé (ou su trouver) la solution, mais ce lien là semble donner une piste intéressante :
https://wiki.debian.org/fr/Swap

Par contre je ne comprends pas tout…
visiblement, il semble qu’il faut que je configure un swap mais comment être certain que Yunohost le verra bien ?

Merci d’avance pour vos idées !

A propos du serveur Yunohost :
yunohost_version: 4.0.8
serveur : VPS chez un hébergeur (8 go de RAM)
pas de modifications particulières
(il tourne déjà bien avec Nextcloud dessus)

Finalement, en cherchant un peu j’ai trouvé ici la recette pour créer le swap :

A swapfile will enable your system to extend its limited memory through its disk capacity. The following commands will create a 1 GB swapfile.

```
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1024000
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
```

Then add this line in `/etc/fstab` :

```
/swapfile none swap sw 0 0
```

Reboot the system and try the installation again.

Mais je me retrouve maintenant avec le fameux problèmes des dépendances qui semblent être régulier lorsque l’on veut installer Discourse et Nextcloud sur le même serveur :frowning:

2020-10-06 20:19:34,638: DEBUG - + return 0
2020-10-06 20:19:34,638: DEBUG - + LC_ALL=C
2020-10-06 20:19:34,638: DEBUG - + DEBIAN_FRONTEND=noninteractive
2020-10-06 20:19:34,639: 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 libjemalloc-dev zlib1g-dev libreadline-dev libpq-dev libssl-dev libyaml-dev libcurl4-openssl-dev libapr1-dev libxslt1-dev libxml2-dev postgresql-server-dev-all postgresql-contrib optipng jhead jpegoptim gifsicle brotli --dry-run
2020-10-06 20:19:34,940: DEBUG - + ynh_die '--message=Unable to install dependencies'
2020-10-06 20:19:34,940: WARNING - The following packages have unmet dependencies:
2020-10-06 20:19:34,941: WARNING -  jhead : Depends: libjpeg-turbo-progs but it is not going to be installed
2020-10-06 20:19:34,942: WARNING -  libapr1-dev : Depends: libapr1 (= 1.6.5-1+b1) but it is not going to be installed
2020-10-06 20:19:34,943: WARNING -                Depends: uuid-dev but it is not going to be installed
2020-10-06 20:19:34,944: WARNING -                Depends: libsctp-dev but it is not going to be installed
2020-10-06 20:19:34,945: WARNING -  libcurl4-nss-dev : Conflicts: libcurl4-openssl-dev but 7.64.0-4+deb10u1 is to be installed
2020-10-06 20:19:34,946: WARNING -  libcurl4-openssl-dev : Conflicts: libcurl4-nss-dev but 7.64.0-4+deb10u1 is to be installed
2020-10-06 20:19:34,947: WARNING -  libreadline-dev : Depends: libncurses-dev but it is not going to be installed
2020-10-06 20:19:34,947: DEBUG - + ret_code=1
2020-10-06 20:19:34,947: WARNING -  libxml2-dev : Depends: libicu-dev but it is not going to be installed
2020-10-06 20:19:34,948: DEBUG - + echo 'Unable to install dependencies'
2020-10-06 20:19:34,948: WARNING -  postgresql-server-dev-all : Depends: dctrl-tools but it is not going to be installed
2020-10-06 20:19:34,948: DEBUG - + exit 1
2020-10-06 20:19:34,949: WARNING -                              Depends: postgresql-server-dev-11 but it is not going to be installed
2020-10-06 20:19:34,949: DEBUG - + ynh_exit_properly
2020-10-06 20:19:34,949: WARNING - Unable to install dependencies
2020-10-06 20:19:34,950: DEBUG - + local exit_code=1
2020-10-06 20:19:34,950: DEBUG - + '[' 1 -eq 0 ']'
2020-10-06 20:19:34,950: DEBUG - + trap '' EXIT
2020-10-06 20:19:34,950: DEBUG - + set +o errexit

Hmf yeah, not sure it’s Nextcloud conflicting but this is a known issue …

Possibly if you want you can try to install from this branch where I proposed a fix : https://github.com/YunoHost-Apps/discourse_ynh/tree/libcurl4

This can be installed by running

yunohost app install https://github.com/YunoHost-Apps/discourse_ynh/tree/libcurl4

It works! you rock @Aleks ! thks!
I was a bit afraid reading all the warnings and Ruby installation took around 1 min but everything went well and Discourse is running.
A last question: Is this branch will be supported for next upgrade ?

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