'make: *** [Makefile:192: src/core/ext/filters/census/grpc_context.lo] Error 127

i'm building docker images PHP 7.4 enable grpc:

errors build:

...
config.status: creating config.h
running: make
/bin/sh /tmp/pear/temp/pear-build-defaultuserkjkape/grpc-1.44.0/libtool --mode=compile g++ -fvisibility=hidden     -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN     -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DGRPC_ARES=0     -DGRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK=1     -DGRPC_XDS_USER_AGENT_NAME_SUFFIX='"PHP"'     -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"1.44.0"' -I. -I/tmp/pear/temp/grpc -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserkjkape/grpc-1.44.0/include -I/tmp/pear/temp/pear-build-defaultuserkjkape/grpc-1.44.0/main -I/tmp/pear/temp/grpc -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 -I/tmp/pear/temp/grpc/include -I/tmp/pear/temp/grpc/src/core/ext/upb-generated -I/tmp/pear/temp/grpc/src/core/ext/upbdefs-generated -I/tmp/pear/temp/grpc/src/php/ext/grpc -I/tmp/pear/temp/grpc/third_party/abseil-cpp -I/tmp/pear/temp/grpc/third_party/address_sorting/include -I/tmp/pear/tem
p/grpc/third_party/boringssl-with-bazel/src/include -I/tmp/pear/temp/grpc/third_party/re2 -I/tmp/pear/temp/grpc/third_party/upb -I/tmp/pear/temp/grpc/third_party/xxhash  -DHAVE_CONFIG_H  -std=c++11 -fno-exceptions -fno-rtti -g -O2   -c /tmp/pear/temp/grpc/src/core/ext/filters/census/grpc_context.cc -o src/core/ext/filters/census/grpc_context.lo
make: /bin/sh: Operation not permitted
make: *** [Makefile:192: src/core/ext/filters/census/grpc_context.lo] Error 127
ERROR: `make' failed
The command '/bin/sh -c echo starting &&     apk update &&     pecl install grpc &&     pecl install protobuf &&     docker-php-ext-enable grpc &&     docker-php-ext-enable protobuf' returned a non-zero code: 1

i'm using php:7.4.28-fpm-alpine3.15

in my dockerfile, i added:

...
# Enable extensions
RUN echo starting && \
    apk update && \
    pecl install grpc && \
    pecl install protobuf && \
    docker-php-ext-enable grpc && \
    docker-php-ext-enable protobuf
...

How can i fix it?

Thanks for your support!



Solution 1:[1]

I fixed it. Solution, just update docker: https://docs.docker.com/engine/install/ubuntu/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Phan Ly Huynh