Migration vers Buster / yunoshost 4 : dpkg/APT broken

Mon serveur YunoHost

Matériel: Raspberry Pi à la maison
Version de YunoHost: 3.8.5
J’ai accès à mon serveur : En SSH
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

Après la migration difficile vers Stretch (cf. Migration partielle vers Stretch / Yunohost 3.x), des difficultés pour la migration vers Buster

sudo yunohost tools migrations migrate --accept-disclaimer
̀` Error: Migration 0015_migrate_to_buster did not complete, aborting. Error: You cannot do this right now because dpkg/APT (the system package managers) seems to be in a broken state… You can try to solve this issue by connecting through SSH and running `sudo apt install --fix-broken` and/or `sudo dpkg --configure -a`. ̀`

J’ai tenté de réparer sans succès (Cf. plus loin)
Des idées ?
Merci d’avance

Historique des commandes et difficultés

sudo apt update && sudo apt dist-upgrade
OK

sudo yunohost tools migrations migrate --accept-disclaimer

Info: Running migration 0006_sync_admin_and_root_passwords...
Info: Your root password have been replaced by your admin password.
Success! Migration 0006_sync_admin_and_root_passwords completed

sudo yunohost tools migrations migrate --accept-disclaimer

Info: Running migration 0008_ssh_conf_managed_by_yunohost_step2...
Success! Configuration updated for 'ssh'
Success! Migration 0008_ssh_conf_managed_by_yunohost_step2 completed

sudo yunohost tools migrations migrate --accept-disclaimer

Info: Running migration 0015_migrate_to_buster...
Info: Fetching available upgrades for system packages...
Error: Migration 0015_migrate_to_buster did not complete, aborting. Error: Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Buster.
Info: The operation 'Run migrations' could not be completed. Please share the full log of this operation using the command 'yunohost log display 20210105-084607-tools_migrations_migrate_forward --share' to get help

sudo yunohost tools update

OK

sudo yunohost tools upgrade --system

ok, il a fait beaucoup d’opérations

sudo yunohost tools migrations migrate --accept-disclaimer

Erreur :

2021-01-05 09:13:07,644: INFO - + Err:689 http://raspbian.raspberrypi.org/raspbian buster/main armhf lua-lpeg armhf 1.0.0-2
2021-01-05 09:13:07,648: INFO - +   Cannot initiate the connection to raspbian.raspberrypi.org:80 (2a00:1098:0:80:1000:75:0:3). - connect (101: Network is unreachable) [IP: 2a00:1098:0:80:1000:75:0:3 80]

Cf. https://paste.yunohost.org/raw/jegetobogu

Relance :

sudo yunohost tools migrations migrate --accept-disclaimer

Erreur.

reboot

Relance :

sudo yunohost tools migrations migrate --accept-disclaimer

Info: Running migration 0015_migrate_to_buster...
Info: Starting migration to Buster
Info: Patching the sources.lists...
Info: Fetching available upgrades for system packages...
error: Cannot find a question for postgresql-common/obsolete-major
Info: Starting upgrade of system packages that needs to be upgrade independently...
Info: Starting main upgrade...
nextcloud-ynh-deps was already set on hold.
Error: Migration 0015_migrate_to_buster did not complete, aborting. Error: You cannot do this right now because dpkg/APT (the system package managers) seems to be in a broken state… You can try to solve this issue by connecting through SSH and running `sudo apt install --fix-broken` and/or `sudo dpkg --configure -a`.
Info: The operation 'Run migrations' could not be completed. Please share the full log of this operation using the command 'yunohost log display 20210105-094607-tools_migrations_migrate_forward --share' to get help

sudo apt install --fix-broken

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  firmware-ralink guile-2.2-libs libboost-filesystem1.62.0 libboost-iostreams1.62.0 libboost-system1.62.0 libhiredis0.13 libncurses6
  libpython3.7-minimal python-apt python3.7-minimal rename sgml-base xml-core
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libalgorithm-diff-xs-perl libdbi-perl libfcgi-perl libfile-fcntllock-perl libgdbm-compat4 libgdbm6 libhiredis0.14 libhtml-parser-perl
  liblocale-gettext-perl libnetaddr-ip-perl libnginx-mod-http-auth-pam libnginx-mod-http-cache-purge libnginx-mod-http-dav-ext
  libnginx-mod-http-echo libnginx-mod-http-fancyindex libnginx-mod-http-geoip libnginx-mod-http-headers-more-filter
  libnginx-mod-http-image-filter libnginx-mod-http-lua libnginx-mod-http-ndk libnginx-mod-http-perl libnginx-mod-http-subs-filter
  libnginx-mod-http-uploadprogress libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-nchan
  libnginx-mod-stream libperl5.28 libsocket6-perl libterm-readkey-perl libtext-charwidth-perl libtext-iconv-perl libtext-soundex-perl
  nginx-extras perl perl-base perl-modules-5.28 systemd
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl gdbm-l10n libdata-dump-perl nginx-doc perl-doc
  libterm-readline-gnu-perl | libterm-readline-perl-perl libb-debug-perl systemd-container policykit-1
Recommended packages:
  libpam-systemd
The following packages will be REMOVED:
  libdbd-mysql-perl
The following NEW packages will be installed:
  libgdbm-compat4 libgdbm6 libhiredis0.14 libperl5.28 perl-modules-5.28
The following packages will be upgraded:
  libalgorithm-diff-xs-perl libdbi-perl libfcgi-perl libfile-fcntllock-perl libhtml-parser-perl liblocale-gettext-perl libnetaddr-ip-perl
  libnginx-mod-http-auth-pam libnginx-mod-http-cache-purge libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-fancyindex
  libnginx-mod-http-geoip libnginx-mod-http-headers-more-filter libnginx-mod-http-image-filter libnginx-mod-http-lua libnginx-mod-http-ndk
  libnginx-mod-http-perl libnginx-mod-http-subs-filter libnginx-mod-http-uploadprogress libnginx-mod-http-upstream-fair
  libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-nchan libnginx-mod-stream libsocket6-perl libterm-readkey-perl
  libtext-charwidth-perl libtext-iconv-perl libtext-soundex-perl nginx-extras perl perl-base systemd
34 upgraded, 5 newly installed, 1 to remove and 619 not upgraded.
28 not fully installed or removed.
Need to get 0 B/14.6 MB of archives.
After this operation, 45.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Reading changelogs... Done
apt-listchanges: Mailing root: apt-listchanges: news for YunoHost
Extracting templates from packages: 100%
Setting up util-linux (2.33.1-0.1) ...
update-alternatives: warning: alternative /usr/bin/pg (part of link group pager) doesn't exist; removing from list of alternatives
insserv: warning: current start runlevel(s) (empty) of script `hwclock.sh' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (S) of script `hwclock.sh' overrides LSB defaults (0 6).
insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
**dpkg: error processing package util-linux (--configure):**
 subprocess installed post-installation script returned error exit status 1
Setting up apt (1.8.2.2) ...
Installing new version of config file /etc/apt/apt.conf.d/01autoremove ...
Installing new version of config file /etc/cron.daily/apt-compat ...
dpkg: dependency problems prevent configuration of mount:
 mount depends on util-linux (>= 2.29.2-3~); however:
  Package util-linux is not configured yet.

**dpkg: error processing package mount (--configure):**
 dependency problems - leaving unconfigured
Setting up apt-transport-https (1.8.2.2) ...
Setting up libcomerr2:armhf (1.44.5-1+deb10u3) ...
Setting up nginx-common (1.14.2-2+deb10u3) ...
insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
**dpkg: error processing package nginx-common (--configure):**
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 util-linux
 mount
 nginx-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo dpkg --configure -a

Setting up libapt-inst2.0:armhf (1.8.2.2) ...
Setting up libxapian30:armhf (1.4.11-1) ...
Setting up libboost-iostreams1.67.0:armhf (1.67.0-13+deb10u1) ...
Setting up raspi-copies-and-fills (0.13) ...
Processing triggers for mime-support (3.60) ...
Setting up libdw1:armhf (0.176-1.1) ...
dpkg: dependency problems prevent configuration of libnet-ssleay-perl:
 libnet-ssleay-perl depends on perl (>= 5.28.0-3); however:
  Version of perl on system is 5.24.1-3+deb9u7.
 libnet-ssleay-perl depends on perlapi-5.28.0; however:
  Package perlapi-5.28.0 is not installed.

**dpkg: error processing package libnet-ssleay-perl (--configure):**
 dependency problems - leaving unconfigured
Setting up apt-utils (1.8.2.2) ...
Processing triggers for install-info (6.5.0.dfsg.1-4+b1) ...
Setting up bash-completion (1:2.8-6) ...
Installing new version of config file /etc/profile.d/bash_completion.sh ...
Setting up nginx-common (1.14.2-2+deb10u3) ...
**insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config**
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package nginx-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libasound2-data (1.1.8-1+rpt1) ...
Processing triggers for initramfs-tools (0.130) ...
Setting up aptitude-common (0.8.11-7) ...
Setting up libasound2:armhf (1.1.8-1+rpt1) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Setting up libgnutls-openssl27:armhf (3.6.7-4+deb10u5) ...
dpkg: dependency problems prevent processing triggers for systemd:
 systemd depends on libsystemd0 (= 232-25+deb9u12); however:
  Version of libsystemd0:armhf on system is 241-7~deb10u5+rpi1.

**dpkg: error processing package systemd (--configure):**
 dependency problems - leaving triggers unprocessed
Setting up libcgi-pm-perl (4.40-1) ...
Setting up libexpat1-dev:armhf (2.2.6-2+deb10u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up insserv (1.18.0-2) ...
Setting up libboost-system1.67.0:armhf (1.67.0-13+deb10u1) ...
Setting up libsigc++-2.0-0v5:armhf (2.10.1-2) ...
Setting up util-linux (2.33.1-0.1) ...
insserv: warning: current start runlevel(s) (empty) of script `hwclock.sh' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (S) of script `hwclock.sh' overrides LSB defaults (0 6).
**insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config**
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
**dpkg: error processing package util-linux (--configure):**
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libgssapi-perl:
 libgssapi-perl depends on perl (>= 5.28.0-3); however:
  Version of perl on system is 5.24.1-3+deb9u7.
 libgssapi-perl depends on perlapi-5.28.0; however:
  Package perlapi-5.28.0 is not installed.

**dpkg: error processing package libgssapi-perl (--configure):**
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mount:
 mount depends on util-linux (>= 2.29.2-3~); however:
  Package util-linux is not configured yet.

**dpkg: error processing package mount (--configure):**
 dependency problems - leaving unconfigured
Setting up libcgi-fast-perl (1:2.13-1) ...
Setting up sysv-rc (2.93-8) ...
Setting up libcwidget3v5:armhf (0.5.17-11) ...
Setting up aptitude (0.8.11-7) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
**Errors were encountered while processing:**
 libnet-ssleay-perl
 nginx-common
 systemd
 util-linux
 libgssapi-perl
 mount

sudo apt update && sudo apt dist-upgrade

Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease                                                              
Hit:3 http://forge.yunohost.org/debian buster InRelease                                                                      
Hit:4 https://packages.sury.org/php buster InRelease                                                                         
Reading package lists... Done                       
Building dependency tree       
Reading state information... Done
654 packages can be upgraded. Run 'apt list --upgradable' to see them.
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:
 libgssapi-perl : Depends: perl (>= 5.28.0-3) but 5.24.1-3+deb9u7 is installed
                  Depends: perlapi-5.28.0
 libnet-ssleay-perl : Depends: perl (>= 5.28.0-3) but 5.24.1-3+deb9u7 is installed
                      Depends: perlapi-5.28.0
 libnginx-mod-http-auth-pam : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-cache-purge : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-dav-ext : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-echo : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-fancyindex : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-geoip : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-headers-more-filter : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-image-filter : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-lua : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-ndk : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-perl : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-subs-filter : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-uploadprogress : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-upstream-fair : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-http-xslt-filter : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-mail : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-nchan : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 libnginx-mod-stream : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 nginx-extras : Depends: nginx-common (= 1.10.3-1+deb9u5) but 1.14.2-2+deb10u3 is installed
 systemd : Depends: libsystemd0 (= 232-25+deb9u12) but 241-7~deb10u5+rpi1 is installed
           Recommends: libpam-systemd but it is not installed
**E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).**

sudo apt install --fix-broken

Extracting templates from packages: 100%
Setting up util-linux (2.33.1-0.1) ...
insserv: warning: current start runlevel(s) (empty) of script `hwclock.sh' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (S) of script `hwclock.sh' overrides LSB defaults (0 6).
**insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config**
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
**dpkg: error processing package util-linux (--configure):**
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mount:
 mount depends on util-linux (>= 2.29.2-3~); however:
  Package util-linux is not configured yet.

**dpkg: error processing package mount (--configure):**
 dependency problems - leaving unconfigured
Setting up nginx-common (1.14.2-2+deb10u3) ...
**insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config**
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package nginx-common (--configure):
 subprocess installed post-installation script returned error exit status 1
**Errors were encountered while processing:**
 util-linux
 mount
 nginx-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hmoké bon toutes les erreurs ont l’air d’être lié à

insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config

Pas sur de piger vraiment ce qui se passe mais commencons par faire un

find /etc -name "raspi-config"

Voici :

admin@YunoHost:~ $ sudo find /etc -name "raspi-config"
/etc/init.d/raspi-config

Alrighty alors tentons naivement :

sudo mv /etc/init.d/raspi-config /root/raspi-config.init.bkp

puis retente les manip précédentes avec apt/dpkg

sudo apt install --fix-broken

Sans erreur. A fait beaucoup d’opérations.

sudo dpkg --configure -a

Pas d’erreur (retour vide)

sudo yunohost tools migrations migrate --accept-disclaimer

Se termine en erreur :

Warning: Errors were encountered while processing:
Warning:  /tmp/apt-dpkg-install-Y1pL72/047-firmware-misc-nonfree_1%3a20190114-1+rpt10_all.deb
Warning: E: Sub-process /usr/bin/dpkg returned an error code (1)
Warning: Could not upgrade packages: 
Info: The operation 'Upgrade system packages' could not be completed. Please share the full log of this operation using the command 'yunohost log display 20210105-140926-tools_upgrade --share' to get help
Error: Migration 0015_migrate_to_buster did not complete, aborting. Error: Could not upgrade all the packages
Info: The operation 'Run migrations' could not be completed. Please share the full log of this operation using the command 'yunohost log display 20210105-140913-tools_migrations_migrate_forward --share' to get help

Logs complet à https://paste.yunohost.org/raw/puhoguzaco

Hmpf …

apt install firmware-misc-nonfree -o Dpkg::Options::="--force-overwrite"

J’hésite toujours à me lancer moi-même avec Dpkg::Options::="--force-overwrite"

sudo apt install firmware-misc-nonfree -o Dpkg::Options::=“–force-overwrite”

Voilà, c’est fait avec succès.

sudo yunohost tools migrations migrate --accept-disclaimer

La migration est passée ! Super !

admin@YunoHost:~ $ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 10 (buster)
Release:	10
Codename:	buster
admin@YunoHost:~ $ sudo yunohost --version
yunohost: 
  repo: stable
  version: 4.0.8.3
yunohost-admin: 
  repo: stable
  version: 4.0.4
moulinette: 
  repo: stable
  version: 4.0.3
ssowat: 
  repo: stable
  version: 4.0.5

Merci beaucoup @Aleks

Je vais vérifier Nextcloud (la seule appli que j’ai dessus).

Humpf !

Tentative d’accès à Nextcloud : 502 Bad Gateway
Va falloir le debugger cette fois !

Avec web admin > diagnostic :

  • système de base :
 Some system packages should be downgraded
    Some packages were inadvertendly installed from a third-party repository called Sury. 
The Yunohost team improved the strategy that handle these packages, but it's expected that some setups that installed PHP7.3 apps while still on Stretch have some remaining inconsistencies. To fix this situation, you should try running the following command: apt install --allow-downgrades libssl1.1=1.1.1d-0+deb10u4+rpt1
  • service :
    dovecot : dead

apt install --allow-downgrades libssl1.1=1.1.1d-0+deb10u4+rpt1

n’a pas résolu

J’ai réinstallé nextcloud. Cela a résolu le problème.

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