[Solved] Upgrade the 'mastodon' app' could not be completed

Mon serveur YunoHost

Matériel: VPS acheté en ligne
Version de YunoHost:
J’ai accès à mon serveur : En SSH
Êtes-vous dans un contexte particulier ou avez-vous effectué des modifications particulières sur votre instance ? : non
Si votre requête est liée à une application, précisez son nom et sa version: Mastodon (mastodon) de 4.2.1~ynh1 à 4.2.3~ynh1

Description du problème

Le lancement de la commande de mise à jour de l’application mastodon de la version 4.2.1~ynh1 à 4.2.3~ynh1 s’est terminé avec un échec “Error: The operation ‘Upgrade the ‘mastodon’ app’ could not be completed.”
Le log complet : https://paste.yunohost.org/raw/cequvozeke

Bonjour nizarus,

Bienvenu au forum!

Tant pis que le mise a jour a une erreur :frowning: Je peux lire Francais, mais ecrire la est un probleme (pour coux qui lirez :stuck_out_tongue_winking_eye: ), je continue au Anglais :wink:

2023-12-15 10:14:52,787: DEBUG - + NO_BACKUP_UPGRADE=1
2023-12-15 10:14:52,787: DEBUG - + ynh_print_warn '--message=$NO_BACKUP_UPGRADE is set, backup will be avoided. Be careful, this upgrade is going to be operated without a security backup'
2023-12-15 10:14:52,789: INFO - [##+.................] > Backing up the app before upgrading (may take a while)...
2023-12-15 10:14:52,795: DEBUG - + ynh_print_log '$NO_BACKUP_UPGRADE is set, backup will be avoided. Be careful, this upgrade is going to be operated without a security backup'

Did you turn off backups on purpose? Do you have a backup separate from the update process?

Unfortunately, it seems that a backup also would not have helped. I noticed another member posting that they had a problem upgrading, and their backup would not restore.

I wondered if more people got a problem; searching revealed that last week some people had problems installing Mastodon.

The problem when installing had to do with Ruby and is maybe corrected now (I did not check), but maybe the solution (built ruby-something) does not work with an existing installation; your log (and the others upgrading) have these lines with a warning:

2023-12-15 10:17:32,751: DEBUG - + ynh_ruby_try_bash_extension
2023-12-15 10:17:32,751: DEBUG - + '[' -x src/configure ']'
2023-12-15 10:17:32,751: DEBUG - + src/configure
2023-12-15 10:17:32,754: DEBUG - + make -C src
2023-12-15 10:17:32,755: DEBUG - make: Entering directory '/opt/rbenv/src'
2023-12-15 10:17:32,756: DEBUG - Warning: this Makefile is obsolete and kept only for backwards compatibility.
2023-12-15 10:17:32,757: DEBUG - You can remove the `configure && make ...' step from your rbenv setup.
2023-12-15 10:17:32,757: DEBUG - make: Leaving directory '/opt/rbenv/src'

Maybe it has nothing to do with the failure, but it is the only thing that seems close to anything resembling an error.

With what I know about Mastodon I can’t help you any further, I hope someone else comes along with a good suggestion!

Thank you @wbk,
Yes I turned off backup as I don’t have enough dis space on my VPS.

Too bad :frowning:

In case a computer at home is running Linux, it would not be complicated to make a connection for backups at home (it won’t help you now, but might be a consideration later)

Un ami, admin du VPS, a trouvé la source du problème :
Le problème était au niveau de la commande command rbenv rehash qui exit 1 par ce que le fichier /opt/rbenv/shims/.rbenv-shim existait et avait ‘username’ comme owner.


Bonjour nizarus,

Great that you were able to resolve the issue!

Because there was no backup, could you complete the update and use your Mastodon?

Maybe you can provide dudenas guidance on how to overcome the problem, he got the same error as you did in Mastodon update failed, then restore backup failed

Hi @wbk,
Yes, the update was completed and our instance is back : MastoTn Admin : « Notre instance était inaccessible pendant deux jo… » - Mastodon Tunisie

1 Like

Thank you @nizarus for sharing the solution!
Sorry I can hardly understand French…
Do I understand correctly, that to solve this I should remove file ‘/opt/rbenv/shims/.rbenv-shim’?
Or do I have to change the owner to something else?

1 Like

Hi @dudenas, in our case we deleted that file.

1 Like

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