1

When I do a command "sudo apt update" on Ubuntu 22.04.3, always occure this error :

W: https://dl.google.com/linux/chrome/deb/dists/stable/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/mysql.gpg are ignored as the file has an unsupported filetype.
W: http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/mysql.gpg are ignored as the file has an unsupported filetype.
W: http://id.archive.ubuntu.com/ubuntu/dists/jammy/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/mysql.gpg are ignored as the file has an unsupported filetype.
W: http://id.archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/mysql.gpg are ignored as the file has an unsupported filetype.
W: http://id.archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/mysql.gpg are ignored as the file has an unsupported filetype.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql.com/apt/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
W: Failed to fetch http://repo.mysql.com/apt/ubuntu/dists/jammy/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
W: Some index files failed to download. They have been ignored, or old ones used instead.

Anyone know how to fix this error?

1 Answer 1

2

Short answer:

Delete the mysql.list then reinstall it.

sudo rm /etc/apt/trusted.gpg.d/mysql.gpg
sudo rm /etc/apt/sources.list.d/mysql.list

wget https://repo.mysql.com//mysql-apt-config_0.8.29-1_all.deb
sudo apt install ./mysql-apt-config_0.8.29-1_all.deb

After the deprecation of apt-key, you can't use the old repository format, that's why you have received a lot of warning. (old keyring set in /etc/apt/trusted.gpg.d/). The new keyring should be downloaded in /etc/apt/keyrings or in /usr/share/keyrings. By downloading and installing the mysql-apt-config_0.8.29-1_all.deb the mysql repository will be set correctly.

cat /etc/apt/sources.list.d/mysql.list

deb [signed-by=/usr/share/keyrings/mysql-apt-config.gpg] http://repo.mysql.com/apt/ubuntu/ jammy mysql-apt-config
deb [signed-by=/usr/share/keyrings/mysql-apt-config.gpg] http://repo.mysql.com/apt/ubuntu/ jammy mysql-8.0
deb [signed-by=/usr/share/keyrings/mysql-apt-config.gpg] http://repo.mysql.com/apt/ubuntu/ jammy mysql-tools
deb [signed-by=/usr/share/keyrings/mysql-apt-config.gpg] http://repo.mysql.com/apt/ubuntu/ jammy mysql-tools-preview

The gpg key is included in the .deb file (the postinst script), it should be placed later under /usr/share/keyrings/.

Read more about third party repository on Ubutnu help.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .