Bug #106215 mysql-5.7.37 apt packages are broken on Ubuntu 20.04 LTS
Submitted: 19 Jan 13:20 Modified: 19 Jan 17:43
Reporter: Mika Silander Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.7.37 OS:Ubuntu (20.04 LTS)
Assigned to: CPU Architecture:x86 (Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz)

[19 Jan 13:20] Mika Silander
Description:
Trying to install version 5.7.37 of mysql-server and mysql-client on a Ubuntu 20.04 LTS fails due to a package that contains a corrupt library called libpluginmecab.

How to repeat:
Commands below executed as root.

# wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb

# dpkg -i mysql-apt-config_0.8.22-1_all.deb 

The above package is then configured to use Ubuntu Bionic as distro and mysql-5.7 is selected for "MySQL, Server & Cluster".

# apt-get update

# apt-get install  mysql-client=5.7* mysql-server=5.7*                                       
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Selected version '5.7.37-1ubuntu18.04' (MySQL:repo.mysql.com [amd64]) for 'mysql-client'
Selected version '5.7.37-1ubuntu18.04' (MySQL:repo.mysql.com [amd64]) for 'mysql-server'
The following packages were automatically installed and are no longer required:
  acl colord-data galera-4 hplip-data libcgi-fast-perl libcgi-pm-perl libcolorhug2 libdbi-perl libfcgi-perl
  libhtml-template-perl libieee1284-3 libimagequant0 libkf5sane-data libpmem1 libsane-common libsnmp-base
  libterm-readkey-perl printer-driver-postscript-hp python3-olefile python3-pexpect python3-pil python3-ptyprocess
  python3-renderpm python3-reportlab python3-reportlab-accel
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  mysql-community-server
The following NEW packages will be installed:
  mysql-client mysql-community-server mysql-server
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/36,7 MB of archives.
After this operation, 219 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Selecting previously unselected package mysql-client.
(Reading database ... 241802 files and directories currently installed.)
Preparing to unpack .../mysql-client_5.7.37-1ubuntu18.04_amd64.deb ...
Unpacking mysql-client (5.7.37-1ubuntu18.04) ...
Preparing to unpack .../mysql-community-server_5.7.37-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-server (5.7.37-1ubuntu18.04) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/mysql-community-server_5.7.37-1ubuntu18.04_amd64.deb (--unpack):
 cannot copy extracted data for './usr/lib/mysql/plugin/debug/libpluginmecab.so' to '/usr/lib/mysql/plugin/debug/libpluginmecab.so.dpkg-new': unexpected end of file or stream
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.37-1ubuntu18.04_amd64.deb ...
Unpacking mysql-server (5.7.37-1ubuntu18.04) ...
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-community-server_5.7.37-1ubuntu18.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Suggested fix:
Packages must be rebuilt as a bare minimum. If this is not enough, try to find out the root cause hwy this one library cannot be successfully extracted from the package during installation.
[19 Jan 14:39] Lars Tangvald
Note that installing 18.04 packages on 20.04 is not supported (in general, 5.7 is not supported on Ubuntu releases after 18.04).

However, I tested it and it seems to work fine. What does your /etc/apt/sources.list.d/mysql.list file look like, now?
[19 Jan 17:06] Mika Silander
Hi.

 Seems I had a problem with the repo package: first I had mysql-apt-config_0.8.12-1.all.deb but then updated to the most recent version, i.e.
mysql-apt-config_0.8.22-1.all.deb.
 After a thorough clean-up of packages and returning to the older version (*.12-*) was enough to solve the issue.

Thanks for the indication to check the apt mysql.list file.