簡體   English   中英

docker-php-ext-install bz2失敗(在php:7.0-fpm-alpine上,使用alpine 3.4)

[英]Failure with `docker-php-ext-install bz2` (on php:7.0-fpm-alpine, with alpine 3.4)

我嘗試在php:7.0-fpm-alpine (基於alpine 3.4)上安裝bz2擴展名:

FROM php:7.0-fpm-alpine
RUN docker-php-ext-install bz2

但是失敗了:

fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
(1/33) Upgrading musl (1.1.14-r15 -> 1.1.14-r16)
(2/33) Installing m4 (1.4.17-r1)
(3/33) Installing perl (5.22.3-r0)
(4/33) Installing autoconf (2.69-r0)
(5/33) Installing pkgconf (0.9.12-r0)
(6/33) Installing pkgconfig (0.25-r1)
(7/33) Installing dpkg-dev (1.18.7-r0)
(8/33) Installing libbz2 (1.0.6-r5)
(9/33) Installing dpkg (1.18.7-r0)
(10/33) Installing libmagic (5.27-r0)
(11/33) Installing file (5.27-r0)
(12/33) Installing libgcc (5.3.0-r0)
(13/33) Installing libstdc++ (5.3.0-r0)
(14/33) Installing binutils-libs (2.26-r1)
(15/33) Installing binutils (2.26-r1)
(16/33) Installing gmp (6.1.0-r0)
(17/33) Installing isl (0.14.1-r0)
(18/33) Installing libgomp (5.3.0-r0)
(19/33) Installing libatomic (5.3.0-r0)
(20/33) Installing mpfr3 (3.1.2-r0)
(21/33) Installing mpc1 (1.0.3-r0)
(22/33) Installing gcc (5.3.0-r0)
(23/33) Installing musl-dev (1.1.14-r16)
(24/33) Installing libc-dev (0.7-r0)
(25/33) Installing g++ (5.3.0-r0)
(26/33) Installing make (4.1-r1)
(27/33) Installing libpcre16 (8.38-r1)
(28/33) Installing libpcre32 (8.38-r1)
(29/33) Installing libpcrecpp (8.38-r1)
(30/33) Installing pcre-dev (8.38-r1)
(31/33) Installing re2c (0.14.3-r0)
(32/33) Installing .phpize-deps (0)
(33/33) Upgrading musl-utils (1.1.14-r15 -> 1.1.14-r16)
Executing busybox-1.24.2-r13.trigger
OK: 223 MiB in 58 packages
+ cd bz2
+ phpize
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
+ ./configure --build=x86_64-linux-musl
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
expr: syntax error
sh: 0: unknown operand
expr: syntax error
sh: 0: unknown operand
expr: syntax error
sh: 0: unknown operand
expr: syntax error
sh: 0: unknown operand
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-musl
checking host system type... x86_64-pc-linux-musl
checking target system type... x86_64-pc-linux-musl
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/    usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20151012
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.14.3 (ok)
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for BZip2 support... yes, shared
checking for BZip2 in default path... not found
configure: error: Please reinstall the BZip2 distribution

即使我嘗試安裝libbz2: apk add --update libbz2

知道如何安裝此擴展程序嗎?

安裝bzip2-dev軟件包可以解決此問題。

例如:

apk add --update bzip2-dev

@yosifkit
在我看來,這是Alpine Linux中的打包錯誤。 就像Debian軟件包一樣,libbz2軟件包應該隨附bzlib.h文件: https ://packages.debian.org/stretch/amd64/libbz2-dev/filelist。

資源

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM