close

[Solved] Docker & Laravel : configure: error: Package requirements (oniguruma) were not met

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Docker & Laravel : configure: error: Package requirements (oniguruma) were not met in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Docker & Laravel : configure: error: Package requirements (oniguruma) were not met Error Occurs?

Today I get the following error Docker & Laravel : configure: error: Package requirements (oniguruma) were not met in php.

How To Solve Docker & Laravel : configure: error: Package requirements (oniguruma) were not met Error ?

  1. How To Solve Docker & Laravel : configure: error: Package requirements (oniguruma) were not met Error ?

    To Solve Docker & Laravel : configure: error: Package requirements (oniguruma) were not met Error in case you absolutely wanted to make sure mbstring gets installed, you can also add libonig-dev to your apt-get install

  2. Docker & Laravel : configure: error: Package requirements (oniguruma) were not met

    To Solve Docker & Laravel : configure: error: Package requirements (oniguruma) were not met Error in case you absolutely wanted to make sure mbstring gets installed, you can also add libonig-dev to your apt-get install

Solution 1

in case you absolutely wanted to make sure mbstring gets installed, you can also add libonig-dev to your apt-get install

Solution 2

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)

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment