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-php-ext-install bz2 on alpine #512

Closed
mykiwi opened this issue Oct 25, 2017 · 5 comments
Closed

docker-php-ext-install bz2 on alpine #512

mykiwi opened this issue Oct 25, 2017 · 5 comments

Comments

@mykiwi
Copy link
Contributor

mykiwi commented Oct 25, 2017

Hello,

I try to install bz2 but without success...

FROM php:7.0-fpm-alpine
RUN docker-php-ext-install bz2
Output
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

Even if I add apk add --update libbz2

Any idea on how to install it?

@yosifkit
Copy link
Member

It seems to me that this is a packaging bug in Alpine Linux. The libbz2 package should come with the bzlib.h file like the Debian package does: https://packages.debian.org/stretch/amd64/libbz2-dev/filelist.

@banyancheung
Copy link

same problem here.. any solution?

@tianon
Copy link
Member

tianon commented Nov 15, 2017

Someone probably needs to file a bug in Alpine on that package to see if the maintainers are willing to update it to include bzlib.h like Debian's package does.

@eduard-sukharev
Copy link

If someone still encounters this problem, installing bzip2-dev package solves this problem. Thus, it doesn't seem to be a bug.

@tianon
Copy link
Member

tianon commented Dec 12, 2017

Awesome, thanks for the pointer @eduard-sukharev!! ❤️

@tianon tianon closed this as completed Dec 12, 2017
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

5 participants