1

i'm new in linux and i got a problem: can't install mysql after downloading mysql-apt-config_0.8.17-1_all.deb from mysql official page and configuring it using:

sudo dpkg -i mysql-apt-config_0.8.17-1_all.deb i got:

(Reading database ... 360760 files and directories currently installed.)
Preparing to unpack .../mysql-apt-config_0.8.17-1_all.deb ...
Unpacking mysql-apt-config (0.8.17-1) over (0.8.17-1) ...
Setting up mysql-apt-config (0.8.17-1) ...
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
OK

sudo dpkg-reconfigure mysql-apt-config i got:

Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
OK

and when typing sudo apt install mysql-server i got:

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:
 mysql-server : Depends: mysql-community-server (= 8.0.24-1ubuntu16.04) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I was looking on internet the way to fix this, but i can't find the solution.

I'm using Linux Mint


Updates:

run the command lsb_release -cs to print your version.

lsb_release -cs

However, you should be using apt to install instead of dpkg like this sudo apt install ./mysql-apt-config_0.8.17-1_all.deb

using: sudo apt install ./mysql-apt-config_0.8.17-1_all.deb

[sudo] password for dev:     
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'mysql-apt-config' instead of './mysql-apt-config_0.8.17-1_all.deb'
mysql-apt-config is already the newest version (0.8.17-1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
5
  • 2
    Questions about linux mint are off topic here on Askubuntu but you can ask this question on unix.stackexchange.com instead where it is on topic. However, you should be using apt to install instead of dpkg like this sudo apt install ./mysql-apt-config_0.8.17-1_all.deb but in any case, your answer can be found here. Since you aren't using Ubuntu, I'm not sure how to proceed. Probably just insert the Ubuntu version name equivalent to your version of Linux mint in place of bionic (e.g., groovy, focal, etc.).
    – mchid
    Commented Apr 28, 2021 at 17:33
  • Yes, I just checked and it looks like Linux Mint uses the same release names as Ubuntu. If you aren't sure what version name to use, run the command lsb_release -cs to print your version.
    – mchid
    Commented Apr 28, 2021 at 17:46
  • I updated the question. Please help:(
    – josmanuel
    Commented Apr 28, 2021 at 18:21
  • Your version is focal. See the answer I linked but use focal instead of bionic when following the instructions.
    – mchid
    Commented Apr 29, 2021 at 5:03
  • Or, you could copy and paste into the file with the 'bionic' as is in the instructions and then use the following sed command to fix the file instead of the sed command used in the answer: sudo sed -i 's/bionic/focal/g' /etc/apt/sources.list.d/mysql.list
    – mchid
    Commented Apr 29, 2021 at 5:10

1 Answer 1

4

mysql repository is misconfigured because the used codename is xenial instead of focal. Use the following command to fix mysql repository (Ulyssa is based on Focal):

sudo sed -i 's/xenial/focal/g' /etc/apt/sources.list.d/mysql.list

Then run:

sudo apt update
sudo apt install mysql-server

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