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.

Solution

Install oniguruma and oniguruma-devel would fix it.

But they are NOT in the offical repo, you could download it from https://pkgs.org/download/oniguruma

For Centos

yum install http://rpms.remirepo.net/enterprise/7/remi/x86_64//oniguruma5-6.9.4-1.el7.remi.x86_64.rpm
yum install http://rpms.remirepo.net/enterprise/7/remi/x86_64//oniguruma5-devel-6.9.4-1.el7.remi.x86_64.rpm