# Migration to YunoHost 11 fails / APT cache update problem?

**URL:** https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822
**Category:** Support
**Tags:** english
**Created:** [August 21, 2022, 3:30pm UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822 "2022-08-21T15:30:33Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![isidoreisou](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@isidoreisou](https://forum.yunohost.org/u/isidoreisou)
#### Post date: [August 21, 2022, 3:30pm UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/1 "2022-08-21T15:30:33Z")

</div>

### 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](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](https://forum.yunohost.org/t/migration-to-11-wont-start-libc6-dev-breaks-libgcc-8-dev/20617/43)

Thanks for your help.

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [August 21, 2022, 4:21pm UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/2 "2022-08-21T16:21:00Z")

</div>

> [@isidoreisou](#):
>
> 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](https://forum.yunohost.org/t/migration-to-11-wont-start-libc6-dev-breaks-libgcc-8-dev/20617/43)

This ain’t your issue

The issue is :

```auto
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:

```auto
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:

```auto
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

```

---

<div class="post-metadata">

### Author: ![isidoreisou](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@isidoreisou](https://forum.yunohost.org/u/isidoreisou)
#### Post date: [August 21, 2022, 5:11pm UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/3 "2022-08-21T17:11:35Z")

</div>

Thank you @Aleks.

I did all that, the migration went well but ended with an error:  
[https://paste.yunohost.org/raw/ibuyakupoc](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

---

<div class="post-metadata">

### Author: ![isidoreisou](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@isidoreisou](https://forum.yunohost.org/u/isidoreisou)
#### Post date: [August 21, 2022, 5:20pm UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/4 "2022-08-21T17:20:36Z")

</div>

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é ?

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [August 22, 2022, 5:01am UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/5 "2022-08-22T05:01:01Z")

</div>

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`

---

<div class="post-metadata">

### Author: ![isidoreisou](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@isidoreisou](https://forum.yunohost.org/u/isidoreisou)
#### Post date: [August 23, 2022, 6:19pm UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/6 "2022-08-23T18:19:33Z")

</div>

Thank you kindly @Aleks , here is the outputs:

`systemctl status yunohost-api`

```auto
● 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`

```auto
-- 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'.    

```

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [August 24, 2022, 7:58am UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/7 "2022-08-24T07:58:21Z")

</div>

> [@isidoreisou](#):
>
> `ImportError: cannot import name 'cache' from 'functools' (/usr/lib/python3.7/functools.py) `

Wokay that’s … weird …

Let’s look at what python versions are installed:

```auto
dpkg --list | grep python

```

---

<div class="post-metadata">

### Author: ![isidoreisou](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@isidoreisou](https://forum.yunohost.org/u/isidoreisou)
#### Post date: [August 24, 2022, 8:17am UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/8 "2022-08-24T08:17:56Z")

</div>

> [@Aleks](#):
>
> `dpkg --list | grep python`

```auto
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)

```

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [August 24, 2022, 8:20am UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/9 "2022-08-24T08:20:27Z")

</div>

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`

---

<div class="post-metadata">

### Author: ![isidoreisou](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@isidoreisou](https://forum.yunohost.org/u/isidoreisou)
#### Post date: [August 24, 2022, 8:48am UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/10 "2022-08-24T08:48:47Z")

</div>

> [@Aleks](#):
>
> So let’s look at `apt policy python3`

```auto
python3:                                                                                                                                       
  Installed: 3.7.3-1                                                                                                                           
  Candidate: 3.7.3-1                                                                                                                           
  Version table:                                                                                                                               
 *** 3.7.3-1 100                                                                                                                               
        100 /var/lib/dpkg/status

```

> [@Aleks](#):
>
> And maybe let’s try `apt install python3.9 --dry-run`

```auto
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

```

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [August 24, 2022, 9:11am UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/11 "2022-08-24T09:11:54Z")

</div>

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 …

---

<div class="post-metadata">

### Author: ![isidoreisou](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@isidoreisou](https://forum.yunohost.org/u/isidoreisou)
#### Post date: [August 24, 2022, 9:25am UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/12 "2022-08-24T09:25:38Z")

</div>

> [@Aleks](#):
>
> Can we check `dpkg --list | grep yunohost`

```auto
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

```

> [@Aleks](#):
>
> 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 …

Is it possible to rebuilt this configuration?

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [August 24, 2022, 9:47am UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/13 "2022-08-24T09:47:56Z")

</div>

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 :

```nohighlight
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:

```auto
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

```

---

<div class="post-metadata">

### Author: ![isidoreisou](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@isidoreisou](https://forum.yunohost.org/u/isidoreisou)
#### Post date: [August 24, 2022, 10:13am UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/14 "2022-08-24T10:13:27Z")

</div>

> [@Aleks](#):
>
> 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…))

```auto
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)

```

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [August 24, 2022, 12:06pm UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/15 "2022-08-24T12:06:20Z")

</div>

Zblerg so let’s fallback to the big command :

```auto
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

```

---

<div class="post-metadata">

### Author: ![isidoreisou](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@isidoreisou](https://forum.yunohost.org/u/isidoreisou)
#### Post date: [August 24, 2022, 12:49pm UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/16 "2022-08-24T12:49:16Z")

</div>

> [@Aleks](#):
>
> `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`

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:

```auto
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?

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [August 24, 2022, 4:38pm UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/17 "2022-08-24T16:38:34Z")

</div>

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

---

<div class="post-metadata">

### Author: ![isidoreisou](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@isidoreisou](https://forum.yunohost.org/u/isidoreisou)
#### Post date: [August 24, 2022, 4:52pm UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/18 "2022-08-24T16:52:08Z")

</div>

> [@Aleks](#):
>
> sudo apt install libc-bin locales

```auto
$ 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

```

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [August 24, 2022, 6:58pm UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/19 "2022-08-24T18:58:31Z")

</div>

> [@isidoreisou](#):
>
> ` libc-bin : Depends: libc6 (> 2.31) but 2.28-10+deb10u1 is to be installed`

Uuuuh so what about `sudo apt policy libc6` ?

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

---

<div class="post-metadata">

### Author: ![isidoreisou](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@isidoreisou](https://forum.yunohost.org/u/isidoreisou)
#### Post date: [August 24, 2022, 7:11pm UTC](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822/20 "2022-08-24T19:11:30Z")

</div>

```auto
$ 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).    

```

```auto
$ 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

```

[Next page](https://forum.yunohost.org/t/migration-to-yunohost-11-fails-apt-cache-update-problem/20822.md?page=2)
