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

PHP8.0-alpha1: PECL not found #1029

Closed
michaljusiega opened this issue Jun 27, 2020 · 5 comments
Closed

PHP8.0-alpha1: PECL not found #1029

michaljusiega opened this issue Jun 27, 2020 · 5 comments

Comments

@michaljusiega
Copy link

michaljusiega commented Jun 27, 2020

Hello,

I'm trying to use an image for PHP 8.0, but pecl command does not exist:

For example:

...
&& pecl install apcu && docker-php-ext-enable apcu \
...

For PHP 7.4: docker run php:7.4.7-apache-buster pecl

Output:

E:\PROJEKTY\intranet>docker run php:7.4.7-apache-buster pecl
Commands:
build                  Build an Extension From C Source
bundle                 Unpacks a Pecl Package
channel-add            Add a Channel
...

For PHP 8.0-alpha1: docker run php:8.0.0alpha1-apache-buster pecl

Output:

E:\PROJEKTY\intranet>docker run php:8.0.0alpha1-apache-buster pecl
/usr/local/bin/docker-php-entrypoint: 9: exec: pecl: not found

It seems to me that the PHP team did something from the PECL repository but I can't find any information about it.

Okay, I found information for Dockerfile PHP 7.4:

# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494

but there is not that line in Dockerfile PHP 8.0.

Is there any replacement for installing this repository?

@tianon
Copy link
Member

tianon commented Jun 27, 2020

See #851

@michaljusiega
Copy link
Author

Okey,

so in PHP 8.0 instead

...
&& pecl install apcu && docker-php-ext-enable apcu \
...

should be:

...
&& mkdir -p /usr/src/php/ext/apcu && curl -fsSL https://pecl.php.net/get/apcu | tar xvz -C "/usr/src/php/ext/apcu" --strip 1 && docker-php-ext-install apcu \
...

or use a pickle utility directly

RUN wget https://github.com/FriendsOfPHP/pickle/releases/download/v0.6.0/pickle.phar && mv pickle.phar /usr/local/bin/pickle
pickle install apcu

In my case, both work.

@josefsabl
Copy link

or use a pickle utility directly

In my case I also had to:

RUN chmod +x /usr/local/bin/pickle

@eiriksm
Copy link

eiriksm commented Oct 6, 2020

In my case I also had to

docker-php-ext-install zip

before being able to use pickle

@strarsis
Copy link

strarsis commented Oct 20, 2020

FROM php:8.0.0RC2-fpm

# Pickle
RUN set -ex \
	&& apt-get update \
	&& apt-get install -y \
		    libzip-dev \
	&& docker-php-ext-install -j$(nproc) zip \
	&& curl -L -o /usr/local/bin/pickle https://github.com/FriendsOfPHP/pickle/releases/download/v0.6.0/pickle.phar \
	&& chmod +x /usr/local/bin/pickle

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