PHP 编译错误 Package requirements (oniguruma) were not met

   刚刚使用oneinstack编译PHP安装的时候出现了错误:

checking for oniguruma... no
configure: error: Package requirements (oniguruma) were not met:
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.

解决方法:

  • RHEL/CentOS <= 7

在网站 https://pkgs.org/search/?q=oniguruma 下载相应的 oniguruma-devel,或者运行:

yum install oniguruma-devel
  • RHEL/CentOS 8

在 Centos 8 中,官方 CentOS x86_64 存储库上的没有 oniguruma-devel,可以在网站 https://pkgs.org/search/?q=oniguruma 下载 Remi x86_64 仓库的 oniguruma-6.8.2-0.1.el8.remi.x86_64.rpm 和 oniguruma-devel-6.8.2-0.1.el8.remi.x86_64.rpm。执行安装命令:

 sudo yum install ./oniguruma-6.8.2-0.1.el8.remi.x86_64.rpm
$ sudo yum install ./oniguruma-devel-6.8.2-0.1.el8.remi.x86_64.rpm
  • Ubuntu/Debian

在 https://pkgs.org/download/libonig-dev下载相应版本的 libonig-dev,或者运行:

sudo apt-get install libonig-dev

 

正文完
 
评论(没有评论)