Yunohost mise à jour impossible

Juil 20
2024

Erreur lors apt upgrade :

dpkg: error processing package yunohost (–configure):
installed yunohost package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
yunohost

Trace complète :

 root@toto:~# apt upgrade
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Calculating upgrade… Done
The following package was automatically installed and is no longer required:
equivs
Use ‘apt autoremove’ to remove it.
The following NEW packages will be installed:
libraqm0 linux-image-5.10.0-31-amd64
The following packages will be upgraded:
base-files distro-info-data dns-root-data ffmpeg galera-4 krb5-locales libavcodec58 libavdevice58 libavfilter7 libavformat58
libavresample4 libavutil56 libcurl3-gnutls libgd3 libgdk-pixbuf-2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libglib2.0-0
libglib2.0-data libgnutls30 libgssapi-krb5-2 libk5crypto3 libkrb5-3 libkrb5support0 libnss-systemd libpam-systemd libpostproc55
libswresample3 libswscale5 libsystemd0 libudev1 libvpx6 linux-image-amd64 linux-libc-dev nano php8.1-imagick php8.2 php8.2-cli
php8.2-common php8.2-fpm php8.2-gd php8.2-mbstring php8.2-opcache php8.2-readline php8.2-xml python3-idna python3-reportbug
reportbug systemd systemd-sysv udev yunohost-admin
52 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/94.1 MB of archives.
After this operation, 318 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs… Done
Extracting templates from packages: 100%
Setting up yunohost (11.2.22) …
Regenerating configuration, this might take a while…
Traceback (most recent call last):
File « /usr/lib/python3.9/logging/config.py », line 389, in resolve
found = getattr(found, frag)
AttributeError: module ‘moulinette.interfaces’ has no attribute ‘api’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File « /usr/lib/python3.9/logging/config.py », line 564, in configure
handler = self.configure_handler(handlers[name])
File « /usr/lib/python3.9/logging/config.py », line 722, in configure_handler
klass = self.resolve(cname)
File « /usr/lib/python3.9/logging/config.py », line 391, in resolve
self.importer(used)
File « /usr/lib/python3/dist-packages/moulinette/interfaces/api.py », line 12, in <module>
from gevent import sleep
File « /usr/lib/python3/dist-packages/gevent/__init__.py », line 86, in <module>
from gevent._hub_local import get_hub
File « /usr/lib/python3/dist-packages/gevent/_hub_local.py », line 101, in <module>
import_c_accel(globals(), ‘gevent.__hub_local’)
File « /usr/lib/python3/dist-packages/gevent/_util.py », line 148, in import_c_accel
mod = importlib.import_module(cname)
File « /usr/lib/python3.9/importlib/__init__.py », line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File « src/gevent/_hub_local.py », line 1, in init gevent._gevent_c_hub_local
ValueError: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 152 from C header, got 40 from PyObject

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File « /usr/bin/yunohost », line 77, in <module>
yunohost.cli(
File « /usr/lib/python3/dist-packages/yunohost/__init__.py », line 35, in cli
init_logging(interface= »cli », debug=debug, quiet=quiet)
File « /usr/lib/python3/dist-packages/yunohost/__init__.py », line 168, in init_logging
configure_logging(logging_configuration)
File « /usr/lib/python3/dist-packages/moulinette/utils/log.py », line 67, in configure_logging
dictConfig(logging_config)
File « /usr/lib/python3.9/logging/config.py », line 809, in dictConfig
dictConfigClass(config).configure()
File « /usr/lib/python3.9/logging/config.py », line 571, in configure
raise ValueError(‘Unable to configure handler ‘
ValueError: Unable to configure handler ‘api’
dpkg: error processing package yunohost (–configure):
installed yunohost package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
yunohost
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@toto:~#

L’info importante est ici :

ValueError: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 152 from C header, got 40 from PyObject

En comparant pip et dpkg, il y a une différence de version :

root@toto:/var/log/apt# pip3 list | grep greenlet
greenlet               3.0.3
root@toto:/var/log/apt# dpkg –list | grep greenlet
ii  python3-greenlet                      0.4.17-1+b1                                        amd64        Lightweight in-process concurrent programming (python3)

Solution : Désinstaller la version pip :

root@toto:~# pip uninstall greenlet
Found existing installation: greenlet 3.0.3
Uninstalling greenlet-3.0.3:
Would remove:
/usr/local/include/python3.9/greenlet/greenlet.h
/usr/local/lib/python3.9/dist-packages/greenlet-3.0.3.dist-info/*
/usr/local/lib/python3.9/dist-packages/greenlet/*
Proceed (y/n)? y
Successfully uninstalled greenlet-3.0.3
root@toto:~#

La mise à jour passe sans souci ensuite.

source :
https://forum.yunohost.org/t/python-error-on-all-yunohost-commands-and-webadmin/28506

Comments are closed.