Docker & Laravel : configure: error: Package requirements (oniguruma) were not met
What @kalatabe said is correct. But in case you absolutely wanted to make sure mbstring gets installed, you can also add libonig-dev
to your apt-get install
Just remove mbstring
from the docker-php-ext-install
instruction.
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 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:
$> docker run --rm -it php:7 php -r "var_dump(mb_ereg_match('^99.*', '123456'));"
bool(false)
$> docker run --rm -it php:7 php -r "var_dump(mb_ereg_match('^12.*', '123456'));"
bool(true)