# 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 and https://pkgs.org/download/oniguruma-devel

For Ubuntu

sudo apt install libonig-dev


For Centos

yum install https://rpms.remirepo.net/enterprise/7/remi/x86_64/oniguruma5php-6.9.6-1.el7.remi.x86_64.rpm
yum install https://rpms.remirepo.net/enterprise/7/remi/x86_64/oniguruma5php-devel-6.9.6-1.el7.remi.x86_64.rpm


### IF THE LINK DIED

I can’t make sure when the packages will be updated，so you can use the link here to search oniguruma5php and oniguruma5php-devel (only for centos, other distribution should use the link in Solution field)

Replace the links in the scripts to the corresponding binary package，and please leave a message for other readers in the comment area.