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

php报错 #4

Closed
qiuyimo opened this issue Mar 11, 2018 · 1 comment
Closed

php报错 #4

qiuyimo opened this issue Mar 11, 2018 · 1 comment

Comments

@qiuyimo
Copy link

qiuyimo commented Mar 11, 2018

➜  docker-lnmp git:(master) docker-compose up
Creating network "dockerlnmp_frontend" with the default driver
Creating network "dockerlnmp_backend" with the default driver
Creating volume "dockerlnmp_mysql-data" with default driver
Pulling mysql (mysql:5.7)...
5.7: Pulling from library/mysql
8176e34d5d92: Already exists
17e372a8ec90: Pull complete
47b869561d3a: Pull complete
c90ab4483f28: Pull complete
d6af16572c5c: Pull complete
6d16794d04ac: Pull complete
aaf442a8fe75: Pull complete
7c6fa8f07ec4: Pull complete
ece17b689642: Pull complete
c55b06e76eaf: Pull complete
661fabfb4fc2: Pull complete
Digest: sha256:227d5c3f54ee3a70c075b1c3013e72781564000d34fc8c7ec5ec353c5b7ef7fa
Status: Downloaded newer image for mysql:5.7
Building php
Step 1/6 : FROM php:7-fpm
7-fpm: Pulling from library/php
8176e34d5d92: Already exists
f6c81892adaa: Pull complete
c8125c73b868: Pull complete
5ef22f6299b6: Pull complete
5ad944ccab65: Pull complete
29375819f1bf: Pull complete
ab0fd58b4304: Pull complete
4d680edf614c: Pull complete
00c9eb01f048: Pull complete
67c661ec9ba8: Pull complete
Digest: sha256:96a52bad9a9fadab038b4ae892c1969057d87bbf32f3c8fae768cd37d5e446e9
Status: Downloaded newer image for php:7-fpm
 ---> e786658e663d
Step 2/6 : ENV TZ=Asia/Shanghai
 ---> Running in 1ea5e24548a8
Removing intermediate container 1ea5e24548a8
 ---> 7fec76ab4ba4
Step 3/6 : COPY sources.list /etc/apt/sources.list
 ---> 63e90ebf8875
Step 4/6 : RUN set -xe     && echo "构建依赖"     && buildDeps="         build-essential         php5-dev         libfreetype6-dev         libjpeg62-turbo-dev         libmcrypt-dev         libpng12-dev     "     && echo "运行依赖"     && runtimeDeps="         libfreetype6         libjpeg62-turbo         libmcrypt4         libpng12-0     "     && echo "安装 php 以及编译构建组件所需包"     && DEBIAN_FRONTEND=noninteractive     && apt-get update     && apt-get install -y ${runtimeDeps} ${buildDeps} --no-install-recommends     && echo "编译安装 php 组件"     && docker-php-ext-install iconv mcrypt mysqli pdo pdo_mysql zip     && docker-php-ext-configure gd         --with-freetype-dir=/usr/include/         --with-jpeg-dir=/usr/include/     && docker-php-ext-install gd     && echo "清理"     && apt-get purge -y --auto-remove         -o APT::AutoRemove::RecommendsImportant=false         -o APT::AutoRemove::SuggestsImportant=false         $buildDeps     && rm -rf /var/cache/apt/*     && rm -rf /var/lib/apt/lists/*
 ---> Running in c69203c2a8e1
+ echo 构建依赖
+ buildDeps=         build-essential         php5-dev         libfreetype6-dev         libjpeg62-turbo-dev         libmcrypt-dev         libpng12-dev
+ echo 运行依赖
+ runtimeDeps=         libfreetype6         libjpeg62-turbo         libmcrypt4         libpng12-0
+ echo 安装 php 以及编译构建组件所需包
+ DEBIAN_FRONTEND=noninteractive
+ apt-get update
构建依赖
运行依赖
安装 php 以及编译构建组件所需包
Ign:1 http://mirrors.163.com/debian jessie InRelease
Get:2 http://mirrors.163.com/debian jessie-updates InRelease [145 kB]
Get:3 http://mirrors.163.com/debian-security jessie/updates InRelease [63.1 kB]
Get:4 http://mirrors.163.com/debian jessie Release [148 kB]
Get:5 http://mirrors.163.com/debian jessie-updates/main amd64 Packages [23.1 kB]
Get:6 http://mirrors.163.com/debian-security jessie/updates/main amd64 Packages [632 kB]
Get:7 http://mirrors.163.com/debian jessie Release.gpg [2434 B]
Get:8 http://mirrors.163.com/debian jessie/main amd64 Packages [9064 kB]
Fetched 10.1 MB in 20s (489 kB/s)
Reading package lists...
+ apt-get install -y libfreetype6 libjpeg62-turbo libmcrypt4 libpng12-0 build-essential php5-dev libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev --no-install-recommends
Reading package lists...
Building dependency tree...
Reading state information...
Package php5-dev 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
However the following packages replace it:
  php5-json dh-php5

E: Package 'php5-dev' has no installation candidate
ERROR: Service 'php' failed to build: The command '/bin/sh -c set -xe     && echo "构建依赖"     && buildDeps="         build-essential         php5-dev         libfreetype6-dev         libjpeg62-turbo-dev         libmcrypt-dev         libpng12-dev     "     && echo "运行依赖"     && runtimeDeps="         libfreetype6         libjpeg62-turbo         libmcrypt4         libpng12-0     "     && echo "安装 php 以及编译构建组件所需包"     && DEBIAN_FRONTEND=noninteractive     && apt-get update     && apt-get install -y ${runtimeDeps} ${buildDeps} --no-install-recommends     && echo "编译安装 php 组件"     && docker-php-ext-install iconv mcrypt mysqli pdo pdo_mysql zip     && docker-php-ext-configure gd         --with-freetype-dir=/usr/include/         --with-jpeg-dir=/usr/include/     && docker-php-ext-install gd     && echo "清理"     && apt-get purge -y --auto-remove         -o APT::AutoRemove::RecommendsImportant=false         -o APT::AutoRemove::SuggestsImportant=false         $buildDeps     && rm -rf /var/cache/apt/*     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

初学 docker, 请见谅.

@twang2218
Copy link
Owner

写这篇文章的时候,php:7-fpm 还是 Debian 8 - Jessie,现在已经升级为 Debian 9 - Stretch,所以有些包有所改变。我抽时间会升级一下这个文章,在此期间,你可以访问: https://packages.debian.org/ 来寻找所需的新的包名和版本然后修改 Dockerfile 中的依赖包。

@qiuyimo qiuyimo closed this as completed Mar 18, 2018
zsnmwy added a commit to zsnmwy/docker-lnmp that referenced this issue Sep 2, 2018
@zsnmwy zsnmwy mentioned this issue Sep 2, 2018
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

2 participants