Fix php7.4 no package ‘oniguruma’ found

If you are compiling php7.4 with --with-mbstring, oniguruma is required.

Error Log

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.


Install oniguruma and oniguruma-devel would fix it.

But they are NOT in the offical repo, you could download it from

For Centos

yum install
yum install