Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose: mysql-client has no installation candidate #192

Open
Soneji opened this issue Aug 14, 2019 · 5 comments
Open

docker-compose: mysql-client has no installation candidate #192

Soneji opened this issue Aug 14, 2019 · 5 comments

Comments

@Soneji
Copy link

Soneji commented Aug 14, 2019

Describe the bug
I ran docker-compose up and it says there is a problem with mysql when trying to build an image, I think.

To Reproduce
Steps to reproduce the behavior:

  1. git clone git@github.com:changeweb/Unifiedtransform.git
  2. docker-compose up

Expected behavior
maybe the containers would come up, not really sure as this is first time using this software

Screenshots

Creating network "lms_app-network" with driver "bridge"
Creating volume "lms_dbdata" with local driver
Building app
Step 1/17 : FROM php:7.2-fpm
7.2-fpm: Pulling from library/php
1ab2bdfe9778: Pull complete
1448c64389e0: Pull complete
4b8a4e62b444: Pull complete
9eb9d1e8e241: Pull complete
f79af9fc2d6a: Pull complete
71f85fa247d9: Pull complete
0a39b1043a22: Pull complete
928956ea0bfa: Pull complete
8a16cfe22066: Pull complete
654ea3a6b867: Pull complete
0248b34e2684: Pull complete
Digest: sha256:2f25440bd991e0b8f21b5a7c8311a9b430b200dde68da494f136a7910d71cba5
Status: Downloaded newer image for php:7.2-fpm
 ---> 6a090e6c5398
Step 2/17 : COPY composer.lock composer.json /var/www/
 ---> bf25a819a7fa
Step 3/17 : WORKDIR /var/www
 ---> Running in 10326ae1dacd
Removing intermediate container 10326ae1dacd
 ---> 7a77b4262f0d
Step 4/17 : RUN apt-get update && apt-get install -y     build-essential     mysql-client     libpng-dev     libjpeg62-turbo-dev     libfreetype6-dev     locales     zip     jpegoptim optipng pngquant gifsicle     vim     unzip     git     curl
 ---> Running in b5dec0f8836e
Get:1 http://security-cdn.debian.org/debian-security buster/updates InRelease [39.1 kB]
Get:2 http://security-cdn.debian.org/debian-security buster/updates/main amd64 Packages [59.8 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian buster InRelease [118 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease [46.8 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian buster/main amd64 Packages [7897 kB]
Fetched 8161 kB in 2s (5117 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Package mysql-client is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mysql-client' has no installation candidate
ERROR: Service 'app' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y     build-essential     mysql-client     libpng-dev     libjpeg62-turbo-dev     libfreetype6-dev     locales     zip     jpegoptim optipng pngquant gifsicle     vim     unzip     git     curl' returned a non-zero code: 100```


Thanks :) 
@muhammadusmanahmed
Copy link

i am also facing same error please check screenshot below.
Screenshot 2019-08-19 at 10 09 40 PM

@changeweb
Copy link
Owner

changeweb commented Aug 19, 2019

The answer is in the link https://stackoverflow.com/questions/57048428/e-package-mysql-client-has-no-installation-candidate-in-php-fpm-image-build-u.

Change in

# Install dependencies
RUN apt-get update && apt-get install 
 -y \
build-essential \
mysql-client \...

Docker file according to the answer.

That is if you are using php7.3 then change mysql-client to mariadb-client

@Soneji
Copy link
Author

Soneji commented Aug 19, 2019

I have edited docker-compose.yml to incorporate this change

@changeweb
Copy link
Owner

Can you share the changes?

@sherwyco
Copy link

a little bit late but for anyone using php 7.2 and for people who still want to use mysql. just change it to default-mysql-client instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants