Upgrading Debian 10 Buster to Debian 11 Bullseye

I upgraded from Debian Buster to Debian Bullseye, after that when I did apt update: the following warnings and errors appear:
t
root@servpc:~# apt update
Hit:1 Index of /debian bullseye InRelease
Hit:2 Index of /debian-security bullseye-security InRelease
Hit:3 Index of /debian bullseye-updates InRelease
Get:4 Index of /apache2/ bullseye InRelease [7,482 B]
Get:5 Index of /php/ bullseye InRelease [7,551 B]
Err:4 Index of /apache2/ bullseye InRelease
The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key [email protected]
Err:5 Index of /php/ bullseye InRelease
The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key [email protected]
Get:6 Index of /packages/mainline/debian/ bullseye InRelease [2,878 B]
Err:6 Index of /packages/mainline/debian/ bullseye InRelease
The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key [email protected]
Hit:7 https://apt.hestiacp.com bullseye InRelease
Ign:8 mirror - MvA bullseye InRelease
Err:9 mirror - MvA bullseye Release
404 Not Found [IP: 195.65.111.42 443]
Reading package lists… Done
W: GPG error: Index of /apache2/ bullseye InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key [email protected]
E: The repository ‘Index of /apache2/ bullseye InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: Index of /php/ bullseye InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key [email protected]
E: The repository ‘Index of /php/ bullseye InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: Index of /packages/mainline/debian/ bullseye InRelease: The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key [email protected]
E: The repository ‘Index of /packages/mainline/debian/ bullseye InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository ‘mirror - MvA bullseye Release’ does not have a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

And when doing apt full-upgrade, the following appears:

Preconfiguring packages …
Determining localhost credentials from /etc/mysql/debian.cnf: failed (no client section).
(Reading database … 67074 files and directories currently installed.)
Preparing to unpack …/phpmyadmin_4%3a5.0.4+dfsg2-2+deb11u1_all.deb …
Determining localhost credentials from /etc/mysql/debian.cnf: failed (no client section).
dpkg-maintscript-helper: error: file ‘/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint’ not owned by package ‘phpmyadmin:all’
dpkg-maintscript-helper: error: file ‘/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint/sql-hint.js’ not owned by package ‘phpmyadmin:all’
dpkg-maintscript-helper: error: file ‘/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint/show-hint.css’ not owned by package ‘phpmyadmin:all’
dpkg-maintscript-helper: error: file ‘/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint/show-hint.js’ not owned by package ‘phpmyadmin:all’
dpkg-maintscript-helper: error: directory ‘/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint’ contains files not owned by package phpmyadmin:all, cannot switch to symlink
dpkg: error processing archive /var/cache/apt/archives/phpmyadmin_4%3a5.0.4+dfsg2-2+deb11u1_all.deb (–unpack):
new phpmyadmin package pre-installation script subprocess returned error exit status 1
Determining localhost credentials from /etc/mysql/debian.cnf: failed (no client section).
dbconfig-common: flushing administrative password
Errors were encountered while processing:
/var/cache/apt/archives/phpmyadmin_4%3a5.0.4+dfsg2-2+deb11u1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Me pueden ayudar por favor

For the PHP and Apache2 expired signing keys:

curl -sSLo /usr/share/keyrings/sury-keyring.gpg https://packages.sury.org/php/apt.gpg
curl -sSLo /usr/share/keyrings/apache2-keyring.gpg https://packages.sury.org/apache2/apt.gpg

For the Nginx expired signing key:

curl -sSL https://nginx.org/keys/nginx_signing.key | sudo gpg --dearmor > /usr/share/keyrings/nginx-keyring.gpg
1 Like

Regarding the debian.cnf and phpmyadmin issues, first fix the expired keys and then we will take a look to the other issues.

Anyway, for the debian.cnf error, check if the file exists and if there is a section like this, if it isn’t, you should create it:

[client]
host     = localhost
user     = root
password='HereYourPassword'

You must replace HereYourPassword with actual root password (the root user is the one on MySQL/MariaDB not the root system user). If you don’t know the root password, check this file, the pass should be there:

cat /root/.my.cnf

You should not install phpmyadmin using debian packages but as I said, first fix the other issues.

1 Like

apt update
Hit:1 Index of /debian bullseye InRelease
Hit:2 Index of /debian-security bullseye-security InRelease
Hit:3 Index of /debian bullseye-updates InRelease
Hit:4 Index of /apache2/ bullseye InRelease
Hit:5 Index of /php/ bullseye InRelease
Hit:6 Index of /packages/mainline/debian/ bullseye InRelease
Hit:7 https://apt.hestiacp.com bullseye InRelease
Ign:8 mirror - MvA bullseye InRelease
Err:9 mirror - MvA bullseye Release
404 Not Found [IP: 195.65.111.42 443]
Reading package lists… Done
E: The repository ‘mirror - MvA bullseye Release’ does not have a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

En /etc/apache2/ no existe el archivo debian,cnf

I don’t know what that repo is, you should check it but it doesn’t seem a repository added by Hestia.

1 Like

Seems a mirror for MariaDB repo, you should modify it for one that works. What’s the MariaDB version you are using?

mysql -V
1 Like

mysql Ver 15.1 Distrib 10.5.23-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper

1 Like
deb http://mirrors.linode.com/debian bullseye main contrib non-free
deb-src http://mirrors.linode.com/debian bullseye main contrib non-free

deb http://mirrors.linode.com/debian-security bullseye-security main contrib non-free
deb-src http://mirrors.linode.com/debian-security bullseye-security main contrib non-free

# buster-updates, previously known as 'volatile'
deb http://mirrors.linode.com/debian bullseye-updates main contrib non-free
deb-src http://mirrors.linode.com/debian bullseye-updates main contrib non-free

You should check the repos configured in dir /etc/apt/sources.list.d/

Yes, I made a backup of every file there is and also changed buster to bullseye

apache2.list apache2.list~ hestia.list hestia.list~ mariadb.list mariadb.list~ nginx.list nginx.list~ php.list php.list~

Ok, do this to modify mariadb.list repo file.

sudo su -
curl -sSL -o /usr/share/keyrings/mariadb-keyring.gpg 'https://mariadb.org/mariadb_release_signing_key.pgp'
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/mariadb-keyring.gpg] https://dlm.mariadb.com/repo/mariadb-server/10.5/repo/debian bullseye main' > /etc/apt/sources.list.d/mariadb.list

First make sure that you have made a backup of /etc/mysql/

tar zcvf /root/etc_mysql_backup_2024-08-18.tar.gz /etc/mysql/

Once done, try again apt update and apt full-upgrade

Sorry, I need to leave so I won’t be able to respond for a few hours.

Gracias, en todo caso hice las ultimas recomendaciones y todo sigue igual:

Unpacking mariadb-server-10.5 (1:10.5.26+maria~deb11) over (1:10.5.23-0+deb11u1) …
Preparing to unpack …/mariadb-server-core-10.5_1%3a10.5.26+maria~deb11_amd64.deb …
Unpacking mariadb-server-core-10.5 (1:10.5.26+maria~deb11) over (1:10.5.23-0+deb11u1) …
Preparing to unpack …/phpmyadmin_4%3a5.0.4+dfsg2-2+deb11u1_all.deb …
Determining localhost credentials from /etc/mysql/debian.cnf: failed (no client section).
dpkg-maintscript-helper: error: file ‘/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint’ not owned by package ‘phpmyadmin:all’
dpkg-maintscript-helper: error: file ‘/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint/sql-hint.js’ not owned by package ‘phpmyadmin:all’
dpkg-maintscript-helper: error: file ‘/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint/show-hint.css’ not owned by package ‘phpmyadmin:all’
dpkg-maintscript-helper: error: file ‘/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint/show-hint.js’ not owned by package ‘phpmyadmin:all’
dpkg-maintscript-helper: error: directory ‘/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint’ contains files not owned by package phpmyadmin:all, cannot switch to symlink
dpkg: error processing archive /var/cache/apt/archives/phpmyadmin_4%3a5.0.4+dfsg2-2+deb11u1_all.deb (–unpack):
new phpmyadmin package pre-installation script subprocess returned error exit status 1
Determining localhost credentials from /etc/mysql/debian.cnf: failed (no client section).
dbconfig-common: flushing administrative password
Errors were encountered while processing:
/var/cache/apt/archives/phpmyadmin_4%3a5.0.4+dfsg2-2+deb11u1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Sigo buscando una solución, si la encuentro te aviso, y/o espero cuando puedas, yo puedo seguir viendo esto un rato mas y despues hasta mañana.

Remember, post in english please :wink:

No, it isn’t the same, mariadb has been updated using the new repo :).

Regarding debian.cnf, do what I say above:

How are you doing? Any advance?

Just in case, to fix phpMyAdmin you could run this script included in Hestia.

/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh

Above script will hold Debian’s phpmyadmin package, will remove the current phpmyadmin dirs (/etc/phpmyadmin/, /usr/share/phpmyadmin/ and /var/lib/phpmyadmin/) and will install the last phpMyAdmin version and will configure it.

First of all thank you very much for your help.
I’m stuck on the last thing with phpmyadmin, this is what happens:
/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh
To remove phpMyAdmin you will need use the root password. Password can be found in /usr/local/hestia/conf/mysql.conf
Would you like to continue? [y/n]y

[ * ] Backing up old configuration files…
[ * ] Marking phpmyadmin as held in apt…
phpmyadmin was already set on hold.
[ * ] Removing old folders… [ * ] Creating new folders… [ * ] Installing phpMyAdmin version v5.2.1… [ * ] Creating localhost configuration… [ * ] Dropping database (could throw an error if successful)… apt full-upgrade Reading package lists… Done Building dependency tree… Done Reading state information… Done Calculating upgrade… Done The following packages have been kept back: phpmyadmin 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded .

Remove phpmyadmin package.

apt remove phpmyadmin

Okay, it seems that everything is updated, but now I can’t access the control panel with user data, for example syscon32 and its password:

Welcome to Hestia Control Panel

Invalid username or password

Select No

I opted for the default option which was yes