G
G
great_772020-01-06 09:07:09
Docker
great_77, 2020-01-06 09:07:09

Error when installing a package using docker, what is the problem and how to solve it?


Step 3/9 : RUN docker-php-ext-install mbstring
...
checking whether to enable multibyte string support... yes, shared
checking whether to enable multibyte regex support (requires oniguruma)... yes
checking for oniguruma.. no
configure: error: Package requirements (oniguruma) were not met:
No package 'oniguruma' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables ONIG_CFLAGS
and ONIG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c docker-php-ext-install mbstring' returned a non-zero code: 1

Dockerfile
FROM php:7.4-fpm

RUN apt-get update \
    && apt-get install -y libpq-dev \
    && pecl install mongodb \
    && docker-php-ext-enable mongodb
RUN docker-php-ext-install mbstring
RUN docker-php-ext-install exif
RUN docker-php-ext-install opcache

RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
    && docker-php-ext-install pgsql pdo_pgsql
COPY conf/ /usr/local/etc/php-fpm.d/
CMD ["php-fpm"]


WORKDIR "/project"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
great_77, 2020-01-11
@great_77

Removed mscript

D
Dmitry, 2020-01-06
@q2digger

Try installing libonig-dev as well, it should fix

RUN apt-get update \
  && apt-get install -y libonig-dev libpq-dev \
 ...

PS https://github.com/docker-library/php/issues/880

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question