Migration to YunoHost 11 fails / APT cache update problem?

My YunoHost server

Hardware: Kimsufi KS4
YunoHost version: 4.4.2.9 (stable)

Description of my issue

Error when trying to migrate to Debian Bullseye et YunoHost 11.x.

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

I’ve tried what is explained here with no success: Migration to 11 won't start : "libc6-dev : Breaks: libgcc-8-dev" - #43 by Aleks

Thanks for your help.

This ain’t your issue

The issue is :

2022-08-21 15:18:34,538: WARNING - E: The repository 'https://last-public-ovh-rtm.snap.mirrors.ovh.net/debian bullseye Release' does not have a Release file.
2022-08-21 15:18:34,540: WARNING - E: The repository 'https://last-public-ovh-metrics.snap.mirrors.ovh.net/debian bullseye Release' does not have a Release file.
2022-08-21 15:18:34,543: WARNING - W: GPG error: https://packages.sury.org/php bullseye InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
2022-08-21 15:18:34,546: WARNING - E: The repository 'https://packages.sury.org/php bullseye InRelease' is not signed.

So for some reason the OVH folks have some Debian repositories which do not provide bullseye packages … Or maybe that’s just for “snap” packages ? idk … Somebody found a similar issue and just removed the corresponding line from the apt config. You may find where they are located with:

sudo grep -nr 'ovh.net' /etc/apt/sources.list /etc/apt/sources.list.d

and you should use nano to edit the corresponding file and remove them (or delete / backup the file entirely)



The other issue seems to be that the sury signing key you got is expired. Running this command should fix that issue:

wget --timeout 900 --quiet "https://packages.sury.org/php/apt.gpg" --output-document=- | gpg --dearmor | sudo tee -a "/etc/apt/trusted.gpg.d/extra_php_version.gpg" >/dev/null
2 Likes

Thank you @Aleks.

I did all that, the migration went well but ended with an error:
https://paste.yunohost.org/raw/ibuyakupoc

Quelque chose s’est mal passé lors de la mise à niveau, le système semble toujours être sous Debian Buster

Another thing: Can’t access to the admin area anymore:

Erreur: "502" Bad Gateway
Action: "GET" /yunohost/api/installed?locale=fr
Message d’erreur :
L’API YunoHost ne répond pas. Peut-être que ‘yunohost-api’ est en panne ou a été redémarré ?

If you’re still able to connect with SSH, please share the output of systemctl status yunohost-api

And : journalctl -u yunohost-api -n 100 --no-hostname --no-pager

1 Like

Thank you kindly @Aleks , here is the outputs:

systemctl status yunohost-api

● yunohost-api.service - YunoHost API Server                                                                                                   
   Loaded: loaded (/lib/systemd/system/yunohost-api.service; enabled; vendor preset: enabled)                                                  
   Active: activating (auto-restart) (Result: exit-code) since Tue 2022-08-23 18:16:36 UTC; 2s ago                                             
  Process: 29389 ExecStart=/usr/bin/yunohost-api $DAEMON_OPTS (code=exited, status=1/FAILURE)
 Main PID: 29389 (code=exited, status=1/FAILURE)

journalctl -u yunohost-api -n 100 --no-hostname --no-pager

-- Logs begin at Tue 2022-08-23 13:56:29 UTC, end at Tue 2022-08-23 18:17:20 UTC. --                                                           
Aug 23 18:16:47 yunohost-api[29427]:     from functools import cache                                                                           
Aug 23 18:16:47 yunohost-api[29427]: ImportError: cannot import name 'cache' from 'functools' (/usr/lib/python3.7/functools.py)                
Aug 23 18:16:47 systemd[1]: yunohost-api.service: Main process exited, code=exited, status=1/FAILURE                                           
Aug 23 18:16:47 systemd[1]: yunohost-api.service: Failed with result 'exit-code'.                                                              
Aug 23 18:16:52 systemd[1]: yunohost-api.service: Service RestartSec=5s expired, scheduling restart.                                           
Aug 23 18:16:52 systemd[1]: yunohost-api.service: Scheduled restart job, restart counter is at 32193.                                          
Aug 23 18:16:52 systemd[1]: Stopped YunoHost API Server.                                                                                       
Aug 23 18:16:52 systemd[1]: Started YunoHost API Server.                                                                                       
Aug 23 18:16:52 yunohost-api[29429]: Traceback (most recent call last):                                                                        
Aug 23 18:16:52 yunohost-api[29429]:   File "/usr/bin/yunohost-api", line 8, in <module>                                                       
Aug 23 18:16:52 yunohost-api[29429]:     import yunohost                                                                                       
Aug 23 18:16:52 yunohost-api[29429]:   File "/usr/lib/moulinette/yunohost/__init__.py", line 10, in <module>                                   
Aug 23 18:16:52 yunohost-api[29429]:     from moulinette.interfaces.cli import colorize, get_locale                                            
Aug 23 18:16:52 yunohost-api[29429]:   File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 14, in <module>                
Aug 23 18:16:52 yunohost-api[29429]:     from moulinette.actionsmap import ActionsMap                                                          
Aug 23 18:16:52 yunohost-api[29429]:   File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 13, in <module>                    
Aug 23 18:16:52 yunohost-api[29429]:     from functools import cache                                                                           
Aug 23 18:16:52 yunohost-api[29429]: ImportError: cannot import name 'cache' from 'functools' (/usr/lib/python3.7/functools.py)                
Aug 23 18:16:52 systemd[1]: yunohost-api.service: Main process exited, code=exited, status=1/FAILURE                                           
Aug 23 18:16:52 systemd[1]: yunohost-api.service: Failed with result 'exit-code'.                                                              
Aug 23 18:16:58 systemd[1]: yunohost-api.service: Service RestartSec=5s expired, scheduling restart.                                           
Aug 23 18:16:58 systemd[1]: yunohost-api.service: Scheduled restart job, restart counter is at 32194.                                          
Aug 23 18:16:58 systemd[1]: Stopped YunoHost API Server.                                                                                       
Aug 23 18:16:58 systemd[1]: Started YunoHost API Server.                                                                                       
Aug 23 18:16:58 yunohost-api[29435]: Traceback (most recent call last):                                                                        
Aug 23 18:16:58 yunohost-api[29435]:   File "/usr/bin/yunohost-api", line 8, in <module>                                                       
Aug 23 18:16:58 yunohost-api[29435]:     import yunohost                                                                                       
Aug 23 18:16:58 yunohost-api[29435]:   File "/usr/lib/moulinette/yunohost/__init__.py", line 10, in <module>                                   
Aug 23 18:16:58 yunohost-api[29435]:     from moulinette.interfaces.cli import colorize, get_locale                                            
Aug 23 18:16:58 yunohost-api[29435]:   File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 14, in <module>                
Aug 23 18:16:58 yunohost-api[29435]:     from moulinette.actionsmap import ActionsMap                                                          
Aug 23 18:16:58 yunohost-api[29435]:   File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 13, in <module>                    
Aug 23 18:16:58 yunohost-api[29435]:     from functools import cache                                                                           
Aug 23 18:16:58 yunohost-api[29435]: ImportError: cannot import name 'cache' from 'functools' (/usr/lib/python3.7/functools.py)                
Aug 23 18:16:58 systemd[1]: yunohost-api.service: Main process exited, code=exited, status=1/FAILURE                                           
Aug 23 18:16:58 systemd[1]: yunohost-api.service: Failed with result 'exit-code'.                                                              
Aug 23 18:17:03 systemd[1]: yunohost-api.service: Service RestartSec=5s expired, scheduling restart.                                           
Aug 23 18:17:03 systemd[1]: yunohost-api.service: Scheduled restart job, restart counter is at 32195.                                          
Aug 23 18:17:03 systemd[1]: Stopped YunoHost API Server.                                                                                       
Aug 23 18:17:03 systemd[1]: Started YunoHost API Server.                                                                                       
Aug 23 18:17:03 yunohost-api[29444]: Traceback (most recent call last):                                                                        
Aug 23 18:17:03 yunohost-api[29444]:   File "/usr/bin/yunohost-api", line 8, in <module>                                                       
Aug 23 18:17:03 yunohost-api[29444]:     import yunohost                                                                                       
Aug 23 18:17:03 yunohost-api[29444]:   File "/usr/lib/moulinette/yunohost/__init__.py", line 10, in <module>                                   
Aug 23 18:17:03 yunohost-api[29444]:     from moulinette.interfaces.cli import colorize, get_locale                                            
Aug 23 18:17:03 yunohost-api[29444]:   File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 14, in <module>                
Aug 23 18:17:03 yunohost-api[29444]:     from moulinette.actionsmap import ActionsMap                                                          
Aug 23 18:17:03 yunohost-api[29444]:   File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 13, in <module>                    
Aug 23 18:17:03 yunohost-api[29444]:     from functools import cache                                                                           
Aug 23 18:17:03 yunohost-api[29444]: ImportError: cannot import name 'cache' from 'functools' (/usr/lib/python3.7/functools.py)                
Aug 23 18:17:03 systemd[1]: yunohost-api.service: Main process exited, code=exited, status=1/FAILURE                                           
Aug 23 18:17:03 systemd[1]: yunohost-api.service: Failed with result 'exit-code'.                                                              
Aug 23 18:17:09 systemd[1]: yunohost-api.service: Service RestartSec=5s expired, scheduling restart.                                           
Aug 23 18:17:09 systemd[1]: yunohost-api.service: Scheduled restart job, restart counter is at 32196.                                          
Aug 23 18:17:09 systemd[1]: Stopped YunoHost API Server.                                                                                       
Aug 23 18:17:09 systemd[1]: Started YunoHost API Server.                                                                                       
Aug 23 18:17:09 yunohost-api[29446]: Traceback (most recent call last):                                                                        
Aug 23 18:17:09 yunohost-api[29446]:   File "/usr/bin/yunohost-api", line 8, in <module>                                                       
Aug 23 18:17:09 yunohost-api[29446]:     import yunohost                                                                                       
Aug 23 18:17:09 yunohost-api[29446]:   File "/usr/lib/moulinette/yunohost/__init__.py", line 10, in <module>                                   
Aug 23 18:17:09 yunohost-api[29446]:     from moulinette.interfaces.cli import colorize, get_locale                                            
Aug 23 18:17:09 yunohost-api[29446]:   File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 14, in <module>                
Aug 23 18:17:09 yunohost-api[29446]:     from moulinette.actionsmap import ActionsMap                                                          
Aug 23 18:17:09 yunohost-api[29446]:   File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 13, in <module>                    
Aug 23 18:17:09 yunohost-api[29446]:     from functools import cache                                                                           
Aug 23 18:17:09 yunohost-api[29446]: ImportError: cannot import name 'cache' from 'functools' (/usr/lib/python3.7/functools.py)                
Aug 23 18:17:09 systemd[1]: yunohost-api.service: Main process exited, code=exited, status=1/FAILURE                                           
Aug 23 18:17:09 systemd[1]: yunohost-api.service: Failed with result 'exit-code'.                                                              
Aug 23 18:17:14 systemd[1]: yunohost-api.service: Service RestartSec=5s expired, scheduling restart.                                           
Aug 23 18:17:14 systemd[1]: yunohost-api.service: Scheduled restart job, restart counter is at 32197.                                          
Aug 23 18:17:14 systemd[1]: Stopped YunoHost API Server.                                                                                       
Aug 23 18:17:14 systemd[1]: Started YunoHost API Server.                                                                                       
Aug 23 18:17:14 yunohost-api[29460]: Traceback (most recent call last):                                                                        
Aug 23 18:17:14 yunohost-api[29460]:   File "/usr/bin/yunohost-api", line 8, in <module>                                                       
Aug 23 18:17:14 yunohost-api[29460]:     import yunohost                                                                                       
Aug 23 18:17:14 yunohost-api[29460]:   File "/usr/lib/moulinette/yunohost/__init__.py", line 10, in <module>                                   
Aug 23 18:17:14 yunohost-api[29460]:     from moulinette.interfaces.cli import colorize, get_locale                                            
Aug 23 18:17:14 yunohost-api[29460]:   File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 14, in <module>                
Aug 23 18:17:14 yunohost-api[29460]:     from moulinette.actionsmap import ActionsMap                                                          
Aug 23 18:17:14 yunohost-api[29460]:   File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 13, in <module>                    
Aug 23 18:17:14 yunohost-api[29460]:     from functools import cache                                                                           
Aug 23 18:17:14 yunohost-api[29460]: ImportError: cannot import name 'cache' from 'functools' (/usr/lib/python3.7/functools.py)                
Aug 23 18:17:14 systemd[1]: yunohost-api.service: Main process exited, code=exited, status=1/FAILURE                                           
Aug 23 18:17:14 systemd[1]: yunohost-api.service: Failed with result 'exit-code'.                                                              
Aug 23 18:17:20 systemd[1]: yunohost-api.service: Service RestartSec=5s expired, scheduling restart.                                           
Aug 23 18:17:20 systemd[1]: yunohost-api.service: Scheduled restart job, restart counter is at 32198.                                          
Aug 23 18:17:20 systemd[1]: Stopped YunoHost API Server.                                                                                       
Aug 23 18:17:20 systemd[1]: Started YunoHost API Server.                                                                                       
Aug 23 18:17:20 yunohost-api[29469]: Traceback (most recent call last):                                                                        
Aug 23 18:17:20 yunohost-api[29469]:   File "/usr/bin/yunohost-api", line 8, in <module>                                                       
Aug 23 18:17:20 yunohost-api[29469]:     import yunohost                                                                                       
Aug 23 18:17:20 yunohost-api[29469]:   File "/usr/lib/moulinette/yunohost/__init__.py", line 10, in <module>                                   
Aug 23 18:17:20 yunohost-api[29469]:     from moulinette.interfaces.cli import colorize, get_locale                                            
Aug 23 18:17:20 yunohost-api[29469]:   File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 14, in <module>                
Aug 23 18:17:20 yunohost-api[29469]:     from moulinette.actionsmap import ActionsMap                                                          
Aug 23 18:17:20 yunohost-api[29469]:   File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 13, in <module>                    
Aug 23 18:17:20 yunohost-api[29469]:     from functools import cache                                                                           
Aug 23 18:17:20 yunohost-api[29469]: ImportError: cannot import name 'cache' from 'functools' (/usr/lib/python3.7/functools.py)                
Aug 23 18:17:20 systemd[1]: yunohost-api.service: Main process exited, code=exited, status=1/FAILURE
Aug 23 18:17:20 systemd[1]: yunohost-api.service: Failed with result 'exit-code'.    

Wokay that’s … weird …

Let’s look at what python versions are installed:

dpkg --list | grep python
ii  dh-python                             3.20190308                                              all          Debian helper tools for packagin
g Python libraries and applications                                                                                                            
ii  libpython-stdlib:amd64                2.7.16-1                                                amd64        interactive high-level object-or
iented language (Python2)                                                                                                                      
ii  libpython2-stdlib:amd64               2.7.16-1                                                amd64        interactive high-level object-or
iented language (Python2)                                                                                                                      
ii  libpython2.7:amd64                    2.7.16-2+deb10u1                                        amd64        Shared Python runtime library (v
ersion 2.7)                                                                                                                                    
ii  libpython2.7-minimal:amd64            2.7.16-2+deb10u1                                        amd64        Minimal subset of the Python lan
guage (version 2.7)                                                                                                                            
ii  libpython2.7-stdlib:amd64             2.7.16-2+deb10u1                                        amd64        Interactive high-level object-or
iented language (standard library, version 2.7)                                                                                                
ii  libpython3-dev:amd64                  3.7.3-1                                                 amd64        header files and a static librar
y for Python (default)                                                                                                                         
ii  libpython3-stdlib:amd64               3.7.3-1                                                 amd64        interactive high-level object-or
iented language (default python3 version)                                                                                                      
rc  libpython3.5-minimal:amd64            3.5.3-1+deb9u3                                          amd64        Minimal subset of the Python lan
guage (version 3.5)                                                                                                                            
ii  libpython3.7:amd64                    3.7.3-2+deb10u3                                         amd64        Shared Python runtime library (v
ersion 3.7)                                                                                                                                    
ii  libpython3.7-dev:amd64                3.7.3-2+deb10u3                                         amd64        Header files and a static librar
y for Python (v3.7)                                                                                                                            
ii  libpython3.7-minimal:amd64            3.7.3-2+deb10u3                                         amd64        Minimal subset of the Python lan
guage (version 3.7)                                                                                                                            
ii  libpython3.7-stdlib:amd64             3.7.3-2+deb10u3                                         amd64        Interactive high-level object-or
iented language (standard library, version 3.7)                                                                                                
ii  python                                2.7.16-1                                                amd64        interactive high-level object-or
iented language (Python2 version)                                                                                                              
ii  python-matplotlib-data                3.0.2-2                                                 all          Python based plotting system (da
ta package)                                                                                                                                    
ii  python-minimal                        2.7.16-1                                                amd64        minimal subset of the Python2 la
nguage                                                                                                                                         
ii  python-pip-whl                        18.1-5                                                  all          Python package installer        
ii  python-talloc:amd64                   2.1.14-2                                                amd64        hierarchical pool based memory a
llocator - Python bindings                                                                                                                     
ii  python2                               2.7.16-1                                                amd64        interactive high-level object-or
iented language (Python2 version)                                                                                                              
ii  python2-minimal                       2.7.16-1                                                amd64        minimal subset of the Python2 la
nguage                                                                                                                                         
ii  python2.7                             2.7.16-2+deb10u1                                        amd64        Interactive high-level object-or
iented language (version 2.7)                                                                                                                  
ii  python2.7-minimal                     2.7.16-2+deb10u1                                        amd64        Minimal subset of the Python lan
guage (version 2.7)                                                                                                                            
ii  python3                               3.7.3-1                                                 amd64        interactive high-level object-or
iented language (default python3 version)                                                                                                      
ii  python3-aiohttp                       3.5.1-1+deb10u1                                         amd64        http client/server for asyncio  
ii  python3-appdirs                       1.4.3-1                                                 all          determining appropriate platform
-specific directories (Python 3)                                                                                                               
ii  python3-asn1crypto                    0.24.0-1                                                all          Fast ASN.1 parser and serializer
 (Python 3)                                                                                                                                    
ii  python3-async-timeout                 3.0.1-1                                                 all          timeout context manager for asyn
cio programs in Python                                                                                                                         
ii  python3-attr                          18.2.0-1                                                all          Attributes without boilerplate (
Python 3)                                                                                                                                      
ii  python3-bottle                        0.12.19-1+deb11u1                                       all          fast and simple WSGI-framework f
or Python 3                                                                                                                                    
ii  python3-bs4                           4.7.1-1                                                 all          error-tolerant HTML parser for P
ython 3                                                                                                                                        
ii  python3-cached-property               1.5.1-3                                                 all          Provides cached-property for dec
orating methods in classes (Python 3)                                                                                                          
ii  python3-certifi                       2018.8.24-1                                             all          root certificates for validating
 SSL certs and verifying TLS hosts (python3)                                                                                                   
ii  python3-cffi-backend                  1.12.2-1                                                amd64        Foreign Function Interface for P
ython 3 calling C code - runtime                                                                                                               
ii  python3-chardet                       3.0.4-3                                                 all          universal character encoding det
ector for Python3                                                                                                                              
ii  python3-cryptography                  2.6.1-3+deb10u2                                         amd64        Python library exposing cryptogr
aphic recipes and primitives (Python 3)                                                                                                        
ii  python3-cycler                        0.10.0-1                                                all          composable kwarg iterator (Pytho
n 3)                                                                                                                                           
ii  python3-dateutil                      2.7.3-3                                                 all          powerful extensions to the stand
ard Python 3 datetime module                                                                                                                   
ii  python3-dbus                          1.2.8-3                                                 amd64        simple interprocess messaging sy
stem (Python 3 interface)                                                                                                                      
ii  python3-decorator                     4.3.0-1.1                                               all          simplify usage of Python decorat
ors by programmers                                                                                                                             
ii  python3-defusedxml                    0.5.0-2                                                 all          XML bomb protection for Python s
tdlib modules (for Python 3)                                                                                                                   
ii  python3-dev                           3.7.3-1                                                 amd64        header files and a static librar
y for Python (default)                                                                                                                         
ii  python3-distutils                     3.7.3-1                                                 all          distutils package for Python 3.x
ii  python3-dnspython                     1.16.0-1+deb10u1                                        all          DNS toolkit for Python 3        
ii  python3-freezegun                     0.3.11-0.1                                              all          Python3 library to mock the date
time module in unit testing                                                                                                                    
ii  python3-future                        0.16.0-1                                                all          Clean single-source support for 
Python 3 and 2 - Python 3.x                                                                                                                    
ii  python3-gevent                        1.3.7-1                                                 amd64        gevent is a coroutine-based Pyth
on networking library                                                                                                                          
ii  python3-gevent-websocket              0.10.1-3+ynh10                                          all          websocket library for the gevent
 networking library (Python 3)                                                                                                                 
ii  python3-greenlet                      0.4.15-2                                                amd64        Lightweight in-process concurren
t programming (python3)                                                                                                                        
ii  python3-idna                          2.6-1                                                   all          Python IDNA2008 (RFC 5891) handl
ing (Python 3)                                                                                                                                 
ii  python3-ifaddr                        0.1.6-1                                                 all          Pure Python implementation for d
etecting IP addresses                                                                                                                          
ii  python3-isodate                       0.6.0-1                                                 all          ISO 8601 date/time/duration pars
er and formatter (Python 3 module)                                                                                                             
ii  python3-jinja2                        2.10-2                                                  all          small but fast and easy to use s
tand-alone template engine                                                                                                                     
ii  python3-kiwisolver                    1.0.1-2+b1                                              amd64        fast implementation of the Casso
wary constraint solver - Python 3.X                                                                                                            
ii  python3-ldap:amd64                    3.1.0-2                                                 amd64        LDAP interface module for Python
3                                                                                                                                              
ii  python3-lexicon                       3.7.0+ynh11-1                                           all          Manipulate DNS records on variou
s DNS providers (Python 3)                                                                                                                     
ii  python3-lib2to3                       3.7.3-1                                                 all          Interactive high-level object-or
iented language (2to3, version 3.6)                                                                                                            
ii  python3-lxml:amd64                    4.3.2-1+deb10u4                                         amd64        pythonic binding for the libxml2
 and libxslt libraries                                                                                                                         
ii  python3-markupsafe                    1.1.0-1                                                 amd64        HTML/XHTML/XML string library fo
r Python 3                                                                                                                                     
ii  python3-matplotlib                    3.0.2-2                                                 amd64        Python based plotting system in 
a style similar to Matlab (Python 3)                                                                                                           
ii  python3-minimal                       3.7.3-1                                                 amd64        minimal subset of the Python lan
guage (default python3 version)                                                                                                                
ii  python3-miniupnpc:amd64               2.1-1+b1                                                amd64        UPnP IGD client lightweight libr
ary Python 3 bindings                                                                                                                          
ii  python3-multidict                     4.5.2-1                                                 amd64        multidict implementation (Python
 library)                                                                                                                                      
ii  python3-numpy                         1:1.16.2-1                                              amd64        Fast array facility to the Pytho
n 3 language                                                                                                                                   
ii  python3-openssl                       19.0.0-1                                                all          Python 3 wrapper around the Open
SSL library                                                                                                                                    
ii  python3-packaging                     19.0-1                                                  all          core utilities for python3 packa
ges                                                                                                                                            
ii  python3-pip                           18.1-5                                                  all          Python package installer        
ii  python3-pkg-resources                 40.8.0-1                                                all          Package Discovery and Resource A
ccess using pkg_resources                                                                                                                      
ii  python3-ply                           3.11-3                                                  all          Lex and Yacc implementation for 
Python3                                                                                                                                        
ii  python3-prompt-toolkit                1.0.15-1                                                all          library for building interactive
 command lines (Python 3)                                                                                                                      
ii  python3-psutil                        5.5.1-1                                                 amd64        module providing convenience fun
ctions for managing processes (Python3)                                                                                                        
ii  python3-publicsuffix                  1.1.0-2                                                 all          Python3 module to get a domain s
uffix using the Public Suffix List                                                                                                             
ii  python3-pyasn1                        0.4.2-3                                                 all          ASN.1 library for Python (Python
 3 module)                                                                                                                                     
ii  python3-pyasn1-modules                0.2.1-0.2                                               all          Collection of protocols modules 
written in ASN.1 language (Python 3)                                                                                                           
ii  python3-pygments                      2.3.1+dfsg-1+deb10u2                                    all          syntax highlighting package writ
ten in Python 3                                                                                                                                
ii  python3-pyparsing                     2.2.0+dfsg1-2                                           all          alternative to creating and exec
uting simple grammars - Python 3.x                                                                                                             
ii  python3-requests                      2.21.0-1                                                all          elegant and simple HTTP library 
for Python3, built for human beings                                                                                                            
ii  python3-requests-file                 1.4.3-1                                                 all          File transport adapter for Reque
sts - Python 3.X                                                                                                                               
ii  python3-requests-toolbelt             0.8.0-1                                                 all          Utility belt for advanced users 
of python3-requests                                                                                                                            
ii  python3-scipy                         1.1.0-7                                                 amd64        scientific tools for Python 3   
ii  python3-setuptools                    40.8.0-1                                                all          Python3 Distutils Enhancements  
ii  python3-six                           1.12.0-1                                                all          Python 2 and 3 compatibility lib
rary (Python 3 interface)                                                                                                                      
ii  python3-soupsieve                     1.8+dfsg-1                                              all          modern CSS selector implementati
on for BeautifulSoup (Python 3)                                                                                                                
ii  python3-tldextract                    2.2.0-2                                                 all          Python library for separating TL
Ds                                                                                                                                             
ii  python3-toml                          0.10.0-1                                                all          library for Tom's Obvious, Minim
al Language - Python 3.x                                                                                                                       
ii  python3-tz                            2019.1-1                                                all          Python3 version of the Olson tim
ezone database                                                                                                                                 
ii  python3-urllib3                       1.24.1-1                                                all          HTTP library with thread-safe co
nnection pooling for Python3                                                                                                                   
ii  python3-venv                          3.7.3-1                                                 amd64        pyvenv-3 binary for python3 (def
ault python3 version)                                                                                                                          
ii  python3-wcwidth                       0.1.7+dfsg1-3                                           all          determine printable width of a s
tring on a terminal (Python 3)                                                                                                                 
ii  python3-yaml                          3.13-2                                                  amd64        YAML parser and emitter for Pyth
on3                                                                                                                                            
ii  python3-yarl                          1.3.0-1                                                 amd64        yet another URL library for Pyth
on                                                                                                                                             
ii  python3-zeep                          3.2.0-1                                                 all          Modern SOAP client library (Pyth
on 3)                                                                                                                                          
ii  python3-zeroconf                      0.36.6-1+ynh11                                          all          Pure Python implementation of mu
lticast DNS service discovery (Python3)                                                                                                        
rc  python3.5-minimal                     3.5.3-1+deb9u3                                          amd64        Minimal subset of the Python lan
guage (version 3.5)                                                                                                                            
ii  python3.7                             3.7.3-2+deb10u3                                         amd64        Interactive high-level object-or
iented language (version 3.7)                                                                                                                  
ii  python3.7-dev                         3.7.3-2+deb10u3                                         amd64        Header files and a static librar
y for Python (v3.7)                                                                                                                            
ii  python3.7-minimal                     3.7.3-2+deb10u3                                         amd64        Minimal subset of the Python lan
guage (version 3.7)                                                                                                                            
ii  python3.7-venv                        3.7.3-2+deb10u3                                         amd64        Interactive high-level object-or
iented language (pyvenv binary, version 3.7)

Hmokay so it’s still running python 3.7 instead of python 3.9 …

So let’s look at apt policy python3

And maybe let’s try apt install python3.9 --dry-run

python3:                                                                                                                                       
  Installed: 3.7.3-1                                                                                                                           
  Candidate: 3.7.3-1                                                                                                                           
  Version table:                                                                                                                               
 *** 3.7.3-1 100                                                                                                                               
        100 /var/lib/dpkg/status
Reading package lists... Done                                                                                                                  
Building dependency tree                                                                                                                       
Reading state information... Done                                                                                                              
Package python3.9 is not available, but is referred to by another package.                                                                     
This may mean that the package is missing, has been obsoleted, or                                                                              
is only available from another source                                                                                                          
                                                                                                                                               
E: Package 'python3.9' has no installation candidate

Wokay I’m heavily confused

Can we check dpkg --list | grep yunohost

But I think the main issue is that you do not have any “proper” Debian repository in the apt’s configuration … This is probably related to what we discussed earlier, but it sounds like you removed too many lines …

ii  yunohost                              4.4.2.9                                                 all          manageable and configured self-h
osting server                                                                                                                                  
ii  yunohost-admin                        11.0.9                                                  all          web administration interface for
 yunohost

Is it possible to rebuilt this configuration?

Not exactly, but we can recreated the file according to what’s in the log you shared earlier … it sounds like you deleted the /etc/apt/sources.list file entirely but it was not problematic … (though indeed i advised to grep ovh.net without realizing the the problematic line were more specific, sorry for this)

So let’s recreate the file using sudo nano /etc/apt/sources.list

and add this content in it :

deb http://debian.mirrors.ovh.net/debian bullseye main
deb http://security.debian.org/debian-security bullseye-security main
deb http://debian.mirrors.ovh.net/debian bullseye-updates main

Save with Ctrl+X, Y and Enter

Then

apt update

to refresh the apt cache

then uuuugh ideally if you can, you should re-run the Buster->Bullseye migration if Yunohost allows you to (using yunohost tools migration run --accept-disclaimer (maybe an ‘s’ at migration ? I always forget…))

If this complains that the “Distribution is not Buster”, then we shall retrigger the apt upgrade ourselves with this huge command:

DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt-get --fix-broken --show-upgraded --quiet -o=Dpkg::Use-Pty=0 -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confdef" dist-upgrade
Traceback (most recent call last):                                                                                                             
  File "/usr/bin/yunohost", line 9, in <module>                                                                                                
    import yunohost                                                                                                                            
  File "/usr/lib/moulinette/yunohost/__init__.py", line 10, in <module>                                                                        
    from moulinette.interfaces.cli import colorize, get_locale                                                                                 
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 14, in <module>                                                     
    from moulinette.actionsmap import ActionsMap                                                                                               
  File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 13, in <module>                                                         
    from functools import cache                                                                                                                
ImportError: cannot import name 'cache' from 'functools' (/usr/lib/python3.7/functools.py)

Zblerg so let’s fallback to the big command :

DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none sudo apt-get --fix-broken --show-upgraded --quiet -o=Dpkg::Use-Pty=0 -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confdef" dist-upgrade
1 Like

So that seems to work, I arrived on a blue screen with choices to make, but my laptop went to sleep, then I got disconnected from ssh…
Now when I try the command again I got this:

se-Pty=0 -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confdef" dist-upgrade          
Reading package lists...                                                                                                                       
Building dependency tree...                                                                                                                    
Reading state information...                                                                                                                   
Correcting dependencies... failed.                                                                                                             
The following packages have unmet dependencies:                                                                                                
 locales : Depends: libc-bin (> 2.31) but 2.28-10+deb10u1 is installed                                                                         
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.                                                   
E: Unable to correct dependencies

Damned! What can I do now?

Zblerg, let’s try naively sudo apt install libc-bin locales ?

$ sudo apt install libc-bin locales                                                                                        
Reading package lists... Done                                                                                                                  
Building dependency tree                                                                                                                       
Reading state information... Done                                                                                                              
locales is already the newest version (2.31-13+deb11u3).                                                                                       
You might want to run 'apt --fix-broken install' to correct these.                                                                             
The following packages have unmet dependencies:                                                                                                
 libc-bin : Depends: libc6 (> 2.31) but 2.28-10+deb10u1 is to be installed                                                                     
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).  
                                              
$ apt --fix-broken install                                                                                                 
Reading package lists... Done                                                                                                                  
Building dependency tree                                                                                                                       
Reading state information... Done                                                                                                              
Correcting dependencies... failed.                                                                                                             
The following packages have unmet dependencies:                                                                                                
 locales : Depends: libc-bin (> 2.31) but 2.28-10+deb10u1 is installed                                                                         
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.                                                   
E: Unable to correct dependencies

Uuuuh so what about sudo apt policy libc6 ?

And maybe sudo apt install libc-bin locales libc6 --dry-run ?

$ sudo apt install libc-bin locales libc6 --dry-run     
                                                                   
Reading package lists... Done                                                                                                                  
Building dependency tree                                                                                                                       
Reading state information... Done                                                                                                              
locales is already the newest version (2.31-13+deb11u3).                                                                                       
You might want to run 'apt --fix-broken install' to correct these.                                                                             
The following packages have unmet dependencies:                                                                                                
 libc-dev-bin : Depends: libc6 (< 2.29) but 2.31-13+deb11u3 is to be installed                                                                 
 libc6-dev : Depends: libc6 (= 2.28-10+deb10u1) but 2.31-13+deb11u3 is to be installed                                                         
 unscd : Depends: libc6 (< 2.29) but 2.31-13+deb11u3 is to be installed                                                                        
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).    
$ sudo apt policy libc6
                                                                                               
libc6:                                                                                                                                         
  Installed: 2.28-10+deb10u1                                                                                                                   
  Candidate: 2.31-13+deb11u3                                                                                                                   
  Version table:                                                                                                                               
     2.31-13+deb11u3 500                                                                                                                       
        500 http://debian.mirrors.ovh.net/debian bullseye/main amd64 Packages                                                                  
 *** 2.28-10+deb10u1 100                                                                                                                       
        100 /var/lib/dpkg/status