Bug #94146 E: Unable to locate package libmysqlclient21 (Debian Jessie)
Submitted: 30 Jan 19:47 Modified: 31 Jan 14:32
Reporter: Gabe Gates Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Package Repos and Docker Images Severity:S1 (Critical)
Version:8.0 OS:Debian (Jessie)
Assigned to: CPU Architecture:x86
Tags: apt repository, libmysqlclient21

[30 Jan 19:47] Gabe Gates
Description:
Last year our company updated from MySQL 5.7 to 8.0. We use some docker containers specifically using debian:jessie, which natively didn't have the APT repositories set up to fetch the MySQL 8.0 dependencies.

I followed the documentation here: (https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/) Specifically the section "Appendix A: Adding and Configuring the MySQL APT Repository Manually". 

At the time everything worked locally for me and my fellow colleagues. Now, this morning a colleague had to start from scratch where he is now getting the following error "E: Unable to locate package libmysqlclient21".

Upon navigating to "http://repo.mysql.com/apt/debian/dists/jessie/mysql-8.0/binary-amd64/" the package is showing as 0kb. And the last modified date is "17-Jan-2019 22:19" which coincides with why we started seeing the problem today.

The output from our docker script is.

Building persisted_prime_db
Step 1/6 : FROM debian:jessie
 ---> 054abe38b1e6
Step 2/6 : COPY docker/mysql-apt.key ./
 ---> 995cd1dd802c
Step 3/6 : RUN echo "deb http://repo.mysql.com/apt/debian/ jessie mysql-8.0" >> /etc/apt/sources.list.d/mysql.list     && apt-key add mysql-apt.key     && apt-get update     && apt-get install -y mysql-client libmysqlclient21
 ---> Running in 4920d8b85b04
OK
Get:1 http://repo.mysql.com jessie InRelease [28.8 kB]
Get:2 http://security.debian.org jessie/updates InRelease [44.9 kB]
Get:3 http://repo.mysql.com jessie/mysql-8.0 amd64 Packages [20 B]
Ign http://deb.debian.org jessie InRelease
Get:4 http://deb.debian.org jessie-updates InRelease [145 kB]
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [794 kB]
Get:6 http://deb.debian.org jessie Release.gpg [2420 B]
Get:7 http://deb.debian.org jessie Release [148 kB]
Get:8 http://deb.debian.org jessie-updates/main amd64 Packages [23.0 kB]
Get:9 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 10.3 MB in 36s (279 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package libmysqlclient21
ERROR: Service 'persisted_prime_db' failed to build: The command '/bin/sh -c echo "deb http://repo.mysql.com/apt/debian/ jessie mysql-8.0" >> /etc/apt/sources.list.d/mysql.list     && apt-key add mysql-apt.key     && apt-get update     && apt-get install -y mysql-client libmysqlclient21' returned a non-zero code: 100

How to repeat:
The following shell commands will probably reproduce the error. Assuming the key file downloaded is in the root directory. For more info (https://dev.mysql.com/doc/refman/8.0/en/checking-gpg-signature.html)

echo "deb http://repo.mysql.com/apt/debian/ jessie mysql-8.0" >> /etc/apt/sources.list.d/mysql.list \
    && apt-key add mysql-apt.key \
    && apt-get update \
    && apt-get install -y mysql-client libmysqlclient21

Suggested fix:
Looks like there was a problem with the build on your end. Redeploy so the package is no longer 0kb.
[31 Jan 9:43] Umesh Shastry
Hello Gabe Gates,

Thank you for the report and feedback.

regards,
Umesh
[31 Jan 10:41] Lars Tangvald
Hi,

MySQL 8.0 has not been supported on Debian 8 since the 8.0.3 pre-release version. Which version of libmysqlclient21 did you have on the working images? The 8.0 repo is still present for Jessie to avoid triggering errors on unrelated apt commands for users who might still have it in their config, but is without any content.

For MySQL 8.0 it's highly recommended you upgrade your containers to debian:stretch.
[31 Jan 14:32] Gabe Gates
Thanks for the recommendation to upgrade to stretch, that's what we had to do yesterday and it seemed to work with stretch. 

MySQL 8.0 on Jessie has been working for everyone at work for the past 6 months or so. Our apt repository was pointing to http://repo.mysql.com/apt/debian/dists/jessie/mysql-8.0/binary-amd64/ which now shows 0kb

When I checked the same for stretch http://repo.mysql.com/apt/debian/dists/stretch/mysql-8.0/binary-amd64/ it displays 26kb which is why we tried upgrading to stretch yesterday.