changeweb / Unifiedtransform

A school management Software

Home Page:https://changeweb.github.io/Unifiedtransform/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-compose: mysql-client has no installation candidate

Soneji opened this issue · comments

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 :) 

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

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

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

Can you share the changes?

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.