Migration fails: 21. Upgrade the system to Debian Bullseye and YunoHost 11.x

Hello all,
I am still a beginner here and am currently stuck in updating my YuhoHost.

My YunoHost server

Hardware: Raspberry Pi 4 8GB
YunoHost version: 4.4.2.1 (just updated from 4.3.6.2)
I have access to my server : Both through the webadmin page and through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

After all system upgrades triggered on webadmin > System update went through without error and the version had updated to 4.4.2.1, I was supposed to run webadmin > Tools > Migration 21. But that migration process fails:

I’m getting two errors to paste, …

Thanks for your help!
Avenor

Hi there,

according to the log, you are encountering the libc6-dev : Breaks: libgcc-8-dev issue

Please check this post for a fix

Thanks for the hint, Aleks.

I tried the commands under 1. and 2. in the linked post and then tried the pending migration “21. Upgrade the system to Debian Bullseye and YunoHost 11.x” from webadmin > Tools > Migrate again. Unfortunately the migration failed again with a similar error.

Did I maybe do something wrong? Here is what the above commands did in my shell:

admin@veno:~ $ sudo cp /var/lib/dpkg/status /root/dpkg_status.bkp
admin@veno:~ $ sudo perl -i~ -0777 -pe 's/(Package: .*-ynh-deps\n(.+:.+\n)+Depends:.*)(build-essential, ?)(.*)/$1$4/g' /var/lib/dpkg/status
admin@veno:~ $ sudo apt remove build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  build-essential
0 upgraded, 0 newly installed, 1 to remove and 1096 not upgraded.
After this operation, 20.5 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 79891 files and directories currently installed.)
Removing build-essential (12.6) ...
admin@veno:~ $ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1096 not upgraded.
admin@veno:~ $ sudo apt remove gcc-8 libgcc-8-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 archivebox-ynh-deps : Depends: zlib1g-dev but it is not going to be installed
                       Depends: python-dev
                       Depends: python3-dev but it is not going to be installed
 calibreweb-ynh-deps : Depends: libsasl2-dev but it is not going to be installed
                       Depends: python3-dev but it is not going to be installed
                       Depends: libjpeg-dev
                       Depends: zlib1g-dev but it is not going to be installed
 dh-autoreconf : Depends: libtool (>= 2.4.2) but it is not going to be installed
 nextcloud-ynh-deps : Depends: smbclient but it is not going to be installed
 seafile-ynh-deps : Depends: python3-dev but it is not going to be installed
                    Depends: libmariadb-dev-compat but it is not going to be installed
                    Depends: libmariadb-dev but it is not going to be installed
                    Depends: libmemcached-dev but it is not going to be installed
                    Depends: libjpeg62-turbo-dev but it is not going to be installed
                    Depends: zlib1g-dev but it is not going to be installed
 searx-ynh-deps : Depends: libxslt-dev
                  Depends: python3-dev but it is not going to be installed
                  Depends: zlib1g-dev but it is not going to be installed
 vaultwarden-ynh-deps : Depends: libc6-dev but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
admin@veno:~ $

Hmpf apt/dpkg is so annoying at not giving proper info about why there are unmet dependencies (i mean none of the problematic packages listed have a direct connection to gcc…)

  1. Let’s see if sudo apt install gcc-8-base brings more success …
  2. If it doesn’t, lets try dpkg --remove gcc-8 and dpkg --remove libgcc-8-dev
  3. If this still doesn’t work, then I think i would force it with dpkg --force-depends --remove gcc-8 and dpkg --force-depends --remove libgcc-8-dev

Hello Aleks,

here are the results:

  1. The migration still failed after running sudo apt install gcc-8-base
  2. I had to add “sudo”, but the commands still refused to remove anything due to dependency problems. The migration still failed.
  3. Again, I added “sudo”. The removals were done. But the migration fails, it seems for other reasons.

    And here is the log of this third attempt: https://paste.yunohost.org/raw/zizobusapo

Let me know if you’d also like to see the shell output of any of the commands under 1., 2. or 3. I have captured text files of each of them.

Thanks for your help!

Zblerg … Can you share the output of sudo apt remove g++ gcc --dry-run ?

Yes, here is the output of that command:

admin@veno:~ $ sudo apt remove g++ gcc --dry-run
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 g++-8 : Depends: gcc-8 (= 8.3.0-6+rpi1) but it is not going to be installed
 libstdc++-8-dev : Depends: libgcc-8-dev (= 8.3.0-6+rpi1) but it is not going to be installed
 libtool : Depends: gcc but it is not going to be installed or
                    c-compiler
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
admin@veno:~ $

Hmf OK, what about : sudo apt remove g++ g++-8 gcc libstdc++-8-dev libtool --dry-run

Here we go:

admin@veno:~ $ sudo apt remove g++ g++-8 gcc libstdc++-8-dev libtool --dry-run
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 dh-autoreconf : Depends: libtool (>= 2.4.2) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
admin@veno:~ $

Alright so without libtool, maybe that’d work:

sudo apt remove g++ g++-8 gcc libstdc++-8-dev

This was the output:

admin@veno:~ $ sudo apt remove g++ g++-8 gcc libstdc++-8-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libtool : Depends: gcc but it is not going to be installed or
                    c-compiler
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
admin@veno:~ $

But unfortunately the webadmin > Tools > Migration failed again.

Here are the logs:


and YunoPaste log is here: https://paste.yunohost.org/raw/pinegawivu

Hmpf okay we had more success with other people with running sudo apt install gcc-8-base and trying to force apt to eat the command

You mentionned earlier :

But what exactly happened when you ran sudo apt install gcc-8-base, did that command suceed ? Or what did it say …?

Here is the output, I had captured this output when I ran the command two days ago:

admin@veno:~ $ sudo apt install gcc-8-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 archivebox-ynh-deps : Depends: zlib1g-dev but it is not going to be installed
                       Depends: python-dev
                       Depends: python3-dev but it is not going to be installed
 calibreweb-ynh-deps : Depends: libsasl2-dev but it is not going to be installed
                       Depends: python3-dev but it is not going to be installed
                       Depends: libjpeg-dev
                       Depends: zlib1g-dev but it is not going to be installed
 dh-autoreconf : Depends: libtool (>= 2.4.2) but it is not going to be installed
 nextcloud-ynh-deps : Depends: smbclient but it is not going to be installed
 seafile-ynh-deps : Depends: python3-dev but it is not going to be installed
                    Depends: libmariadb-dev-compat but it is not going to be installed
                    Depends: libmariadb-dev but it is not going to be installed
                    Depends: libmemcached-dev but it is not going to be installed
                    Depends: libjpeg62-turbo-dev but it is not going to be installed
                    Depends: zlib1g-dev but it is not going to be installed
 searx-ynh-deps : Depends: libxslt-dev
                  Depends: python3-dev but it is not going to be installed
                  Depends: zlib1g-dev but it is not going to be installed
 vaultwarden-ynh-deps : Depends: libc6-dev but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Alrighty so let’s start trying to brute force apt …

sudo apt install gcc-8-base archivebox-ynh-deps calibreweb-ynh-deps nextcloud-ynh-deps seafile-ynh-deps searx-ynh-deps vaultwarden-ynh-deps zlib1g-dev python3-dev libtool libc6-dev

I just ran it. Is this the expected output?

admin@veno:~ $ sudo apt install gcc-8-base archivebox-ynh-deps calibreweb-ynh-deps nextcloud-ynh-deps seafile-ynh-deps searx-ynh-deps vaultwarden-ynh-deps zlib1g-dev python3-dev libtool libc6-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
archivebox-ynh-deps is already the newest version (0.6.2~ynh9).
calibreweb-ynh-deps is already the newest version (0.96.18~ynh1).
nextcloud-ynh-deps is already the newest version (22.2.10~ynh1).
seafile-ynh-deps is already the newest version (8.0.5~ynh1).
searx-ynh-deps is already the newest version (1.1.0~ynh1).
vaultwarden-ynh-deps is already the newest version (1.25.2~ynh2).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cpp-8 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 g++ : Depends: gcc-8 (>= 8.3.0-1~) but it is not going to be installed
 g++-8 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
         Depends: gcc-8 (= 8.3.0-6+rpi1) but it is not going to be installed
 gcc : Depends: gcc-8 (>= 8.3.0-1~) but it is not going to be installed
 libasan5 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libatomic1 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libc6-dev : Depends: libc6 (= 2.31-13+rpt2+rpi1+deb11u3) but 2.28-10+rpt2+rpi1+deb10u1 is to be installed
             Depends: libc-dev-bin (= 2.31-13+rpt2+rpi1+deb11u3) but 2.28-10+rpt2+rpi1+deb10u1 is to be installed
             Depends: libcrypt-dev but it is not going to be installed
             Depends: libnsl-dev but it is not going to be installed
             Breaks: python3.7 (< 3.7.7-1+b1) but 3.7.3-2+deb10u3 is to be installed
 libcc1-0 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libgcc1 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libgfortran5 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libgomp1 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libstdc++-8-dev : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
                   Depends: libgcc-8-dev (= 8.3.0-6+rpi1) but it is not going to be installed
 libstdc++6 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libubsan1 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 python3-dev : Depends: python3 (= 3.9.2-3) but 3.7.3-1 is to be installed
               Depends: libpython3-dev (= 3.9.2-3) but 3.7.3-1 is to be installed
               Depends: python3.9-dev (>= 3.9.2-0~) but it is not going to be installed
               Depends: python3-distutils (>= 3.9.2-0~) but 3.7.3-1 is to be installed
               Depends: libjs-sphinxdoc (>= 2.4.3-5~) but it is not going to be installed
               Breaks: python3 (< 3.9.2-1~) but 3.7.3-1 is to be installed
 zlib1g-dev : Depends: zlib1g (= 1:1.2.11.dfsg-2+deb11u1) but 1:1.2.11.dfsg-1+deb10u1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
admin@veno:~ $

I just attempted the migration and it failed as before. The cause is
Migration 0021_migrate_to_bullseye did not complete, aborting. Error: Failed to reinstall mariadb-common ?

@Aleks, what do you think: Is there still any point in trying to fix the migration or should I just reinstall my YunoHost with a new version 11 image from scratch?

Yes, but I was too tired yesterday to keep thinking about this …

In the meantime, I found some new syntax in apt which allows to ask both the install of some package, and the removal of other, in a single line, which may help with this situation

So let’s try the following:

sudo apt install g++- g++-8- gcc- libstdc++-8-dev- gcc-8-base archivebox-ynh-deps calibreweb-ynh-deps nextcloud-ynh-deps seafile-ynh-deps searx-ynh-deps vaultwarden-ynh-deps zlib1g-dev python3-dev libtool libc6-dev

Hello, sorry, I didn’t mean to rush you. I just felt bad about my unruly Raspberry taking up more and more of your time.

I just tried the last command, and I’m afraid it didn’t do much:

admin@veno:~ $ sudo apt install g++- g++-8- gcc- libstdc++-8-dev- gcc-8-base archivebox-ynh-deps calibreweb-ynh-deps nextcloud-ynh-deps seafile-ynh-deps searx-ynh-deps vaultwarden-ynh-deps zlib1g-dev python3-dev libtool libc6-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
archivebox-ynh-deps is already the newest version (0.6.2~ynh9).
calibreweb-ynh-deps is already the newest version (0.96.18~ynh1).
nextcloud-ynh-deps is already the newest version (22.2.10~ynh1).
seafile-ynh-deps is already the newest version (8.0.5~ynh1).
searx-ynh-deps is already the newest version (1.1.0~ynh1).
vaultwarden-ynh-deps is already the newest version (1.25.2~ynh2).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cpp-8 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libasan5 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libatomic1 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libc6-dev : Depends: libc6 (= 2.31-13+rpt2+rpi1+deb11u3) but 2.28-10+rpt2+rpi1+deb10u1 is to be installed
             Depends: libc-dev-bin (= 2.31-13+rpt2+rpi1+deb11u3) but 2.28-10+rpt2+rpi1+deb10u1 is to be installed
             Depends: libcrypt-dev but it is not going to be installed
             Depends: libnsl-dev but it is not going to be installed
             Breaks: python3.7 (< 3.7.7-1+b1) but 3.7.3-2+deb10u3 is to be installed
 libcc1-0 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libgcc1 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libgfortran5 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libgomp1 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libstdc++6 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 libtool : Depends: gcc but it is not going to be installed or
                    c-compiler
 libubsan1 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
 python3-dev : Depends: python3 (= 3.9.2-3) but 3.7.3-1 is to be installed
               Depends: libpython3-dev (= 3.9.2-3) but 3.7.3-1 is to be installed
               Depends: python3.9-dev (>= 3.9.2-0~) but it is not going to be installed
               Depends: python3-distutils (>= 3.9.2-0~) but 3.7.3-1 is to be installed
               Depends: libjs-sphinxdoc (>= 2.4.3-5~) but it is not going to be installed
               Breaks: python3 (< 3.9.2-1~) but 3.7.3-1 is to be installed
 zlib1g-dev : Depends: zlib1g (= 1:1.2.11.dfsg-2+deb11u1) but 1:1.2.11.dfsg-1+deb10u1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
admin@veno:~ $

The migration attempt failed again, this time complaining about

E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Migration 0021_migrate_to_bullseye did not complete, aborting. Error: Failed to reinstall mariadb-common ?

Let me know if you’d like to see the full pasted log.

Hello Aleks,

since, despite all best efforts, we couldn’t make this migration work on my Raspberry, I decided to go ahead and reinstall my YunoHost from scratch with the new v11.
Thanks again for all your help!

Best,
Avenor

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