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

run docker-compose -f docker-compose56.yml up and throw a error #39

Closed
yuzhiyuan opened this issue Jul 9, 2018 · 2 comments
Closed

Comments

@yuzhiyuan
Copy link

yuzhiyuan commented Jul 9, 2018

when I run docker-compose -f docker-compose56.yml up in the dnmp dir with mac os10.13 or centos 7 ,it throws a error ,like this:

The following packages have unmet dependencies:
libfreetype6-dev : Depends: zlib1g-dev but it is not going to be installed or
libz-dev
libpng12-dev : Depends: zlib1g-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ERROR: Service 'php' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd && : && apt-get install -y libicu-dev && docker-php-ext-install intl && : && apt-get install -y libxml2-dev && apt-get install -y libxslt-dev && docker-php-ext-install soap && docker-php-ext-install xsl && docker-php-ext-install xmlrpc && docker-php-ext-install wddx && : && apt-get install -y libbz2-dev && docker-php-ext-install bz2 && : && docker-php-ext-install zip && docker-php-ext-install pcntl && docker-php-ext-install pdo_mysql && docker-php-ext-install mysqli && docker-php-ext-install mbstring && docker-php-ext-install exif && docker-php-ext-install bcmath && docker-php-ext-install calendar && docker-php-ext-install sockets && docker-php-ext-install gettext && docker-php-ext-install shmop && docker-php-ext-install sysvmsg && docker-php-ext-install sysvsem && docker-php-ext-install sysvshm && docker-php-ext-install opcache' returned a non-zero code: 100

@yeszao
Copy link
Owner

yeszao commented Jul 12, 2018

两个解决方法:
1、删除php/php56/Dockerfile中这一行:

COPY ./sources.list.jessie /etc/apt/sources.list

容器里面直接使用官方源,这样就是build的时候慢一些。
2、把php/php56/source.list.jesse的内容改为中科大的源:

deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free

这样速度会快很多。
试过163、阿里云、腾讯云、清华的源,都会报类似的错误,国内目前测试了这几个,只有中科大的源正常。

@yeszao yeszao closed this as completed Jul 12, 2018
@fallenleavesguy
Copy link

对,连官方的源都已经没用了。。

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

3 participants