In 99% of cases, you never want to run apt upgrade, you want to run apt full-upgrade, especially when upgrading between major versions
Anyway, in that case you shouldn’t run apt manually anyway, what’s needed is to debug the migration log
2025-02-19 22:38:07,866: DEBUG - Keep the following packages at their current version:
2025-02-19 22:38:07,866: DEBUG - 1) libluajit-5.1-2 [2.1.0~beta3+git20220320+dfsg-4.1 (now, stable)]
2025-02-19 22:38:07,866: DEBUG - 2) libluajit-5.1-common [2.1.0~beta3+git20220320+dfsg-4.1 (now, stable)]
2025-02-19 22:38:07,866: DEBUG - 3) libluajit2-5.1-2 [Not Installed]
2025-02-19 22:38:07,866: DEBUG - 4) libnginx-mod-http-auth-pam [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,866: DEBUG - 5) libnginx-mod-http-cache-purge [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,867: DEBUG - 6) libnginx-mod-http-dav-ext [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,867: DEBUG - 7) libnginx-mod-http-echo [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,867: DEBUG - 8) libnginx-mod-http-fancyindex [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,867: DEBUG - 9) libnginx-mod-http-geoip [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,867: DEBUG - 10) libnginx-mod-http-geoip2 [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,867: DEBUG - 11) libnginx-mod-http-headers-more-filter [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,867: DEBUG - 12) libnginx-mod-http-image-filter [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,867: DEBUG - 13) libnginx-mod-http-lua [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,867: DEBUG - 14) libnginx-mod-http-perl [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,867: DEBUG - 15) libnginx-mod-http-subs-filter [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,868: DEBUG - 16) libnginx-mod-http-uploadprogress [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,868: DEBUG - 17) libnginx-mod-http-upstream-fair [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,868: DEBUG - 18) libnginx-mod-http-xslt-filter [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,868: DEBUG - 19) libnginx-mod-mail [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,868: DEBUG - 20) libnginx-mod-nchan [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,868: DEBUG - 21) libnginx-mod-stream [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,868: DEBUG - 22) libnginx-mod-stream-geoip [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,868: DEBUG - 23) libnginx-mod-stream-geoip2 [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,868: DEBUG - 24) libperl5.36 [Not Installed]
2025-02-19 22:38:07,868: DEBUG - 25) lua-ldap [1.3.0-2+b1 (now, stable)]
2025-02-19 22:38:07,868: DEBUG - 26) lua-resty-core [Not Installed]
2025-02-19 22:38:07,869: DEBUG - 27) lua-resty-lrucache [Not Installed]
2025-02-19 22:38:07,869: DEBUG - 28) lua-rex-pcre [2.7.2-4.1 (now)]
2025-02-19 22:38:07,869: DEBUG - 29) moulinette [11.3.0 (now)]
2025-02-19 22:38:07,869: DEBUG - 30) nginx [Not Installed]
2025-02-19 22:38:07,869: DEBUG - 31) nginx-common [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,869: DEBUG - 32) nginx-extras [1.18.0-6.1+deb11u3 (now)]
2025-02-19 22:38:07,869: DEBUG - 33) perl [5.32.1-4+deb11u4 (now)]
2025-02-19 22:38:07,869: DEBUG - 34) perl-base [5.32.1-4+deb11u4 (now)]
2025-02-19 22:38:07,869: DEBUG - 35) perl-modules-5.36 [Not Installed]
2025-02-19 22:38:07,869: DEBUG - 36) ssowat [11.3.0 (now)]
2025-02-19 22:38:07,869: DEBUG - 37) yunohost [11.3.0.2 (now)]
2025-02-19 22:38:07,869: DEBUG - 38) yunohost-admin [11.3.0 (now)]
2025-02-19 22:38:07,870: DEBUG -
2025-02-19 22:38:07,870: DEBUG - Leave the following dependencies unresolved:
2025-02-19 22:38:07,870: DEBUG - 39) yunohost recommends php7.4-fpm
2025-02-19 22:38:07,870: DEBUG - 40) yunohost recommends php7.4-ldap
2025-02-19 22:38:07,870: DEBUG - 41) yunohost recommends php7.4-intl
2025-02-19 22:38:07,870: DEBUG - 42) yunohost recommends php7.4-mysql
2025-02-19 22:38:07,870: DEBUG - 43) yunohost recommends php7.4-curl
2025-02-19 22:38:07,870: DEBUG - 44) yunohost recommends php-php-gettext
2025-02-19 22:38:07,870: DEBUG - 45) yunohost recommends python3-pip
2025-02-19 22:38:07,870: DEBUG - 46) yunohost recommends metronome (>= 3.14.0)
I’ve seen similar situation where libluajit is blocking the migration and aptitude doesn’t find the proper way to resolve the situation
let’s try manually running apt install yunohost nginx libluajit2-5.1-2
and read carefully what it’s going to do before validating. It may uninstall some package (I think minetest for example was known to depend on some libluajit stuff or related dependency … in which case it’s fine to let it uninstall the minetest-ynh-deps virtual package, though you’ll need to force-upgrade the app later to get it back on clean tracks)