Docker amp; Laravel : configure: error: Package requirements (oniguruma) were not met(码头工人Laravel:配置:错误:未满足包要求(oniguruma))
问题描述
谁能帮我解决这个问题.
Can anyone help me with this problem.
当我尝试从 dockerfile 为 laravel 应用程序创建 docker 映像时,我收到此错误:
When i try to create a docker image from a dockerfile for laravel application i get this error:
正在检查 oniguruma...不配置:错误:不满足包要求(oniguruma):
checking for oniguruma... no configure: error: Package requirements (oniguruma) were not met:
命令'/bin/sh -c docker-php-ext-install pdo mbstring'返回一个非零代码:1
The command '/bin/sh -c docker-php-ext-install pdo mbstring' returned a non-zero code: 1
这是我的 Dockerfile:
Here is my Dockerfile:
以及构建 Dockerfile 的 docker 命令
and the docker command to build the Dockerfile
推荐答案
只需从 docker-php-ext-install
指令中删除 mbstring
即可.
Just remove mbstring
from the docker-php-ext-install
instruction.
错误是由依赖问题引起的 - mbstring
扩展需要 oniguruma
库才能使多字节正则表达式函数工作.来自安装指南:
The error is caused by a dependency problem - the mbstring
extension requires the oniguruma
library to make multibyte regular expression functions work. From the installation guide:
Oniguruma 是支持多字节字符的正则表达式函数所必需的.Oniguruma 与 mbstring 捆绑在一起.从 PHP 5.4.0 开始,如果系统上已经安装了 Oniguruma,可以指定 --with-onig[=DIR] 以使用已安装的库.
Oniguruma is necessary for the regular expression functions with multibyte character support. Oniguruma is bundled with mbstring. As of PHP 5.4.0, if Oniguruma is already installed on the system, --with-onig[=DIR] can be specified to use the installed library.
但是,在您使用的映像中,扩展程序已经安装和配置,因此您无需执行任何其他操作:
However, in the image that you're using, the extension is already installed and configured, so you don't need to do anything else:
这篇关于码头工人Laravel:配置:错误:未满足包要求(oniguruma)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!