CentOS7编译安装PHP时 configure: error

2020-11-17  本文已影响0人  刘禹锡_c886

操作系统:CentOS7
安装版本:PHP7.4

1)编译安装PHP7.4的时候报错信息如下

# 编译安装PHP7.4时带上这个后报错
--with-external-pcre --with-pcre-jit
configure: error: Package requirements (libpcre2-8 >= 10.30) were not met: No package 'libpcre2-8' found

2)解决方法

wget https://ftp.pcre.org/pub/pcre/pcre2-10.34.tar.bz2

tar xjvf pcre2-10.34.tar.bz2

cd pcre2-10.34

./configure --prefix=/usr/local/pcre2 \
--enable-pcre2-16 \
--enable-pcre2-32 \
--enable-jit \
--enable-jit-sealloc

make && make install

export PKG_CONFIG_PATH=/usr/local/pcre2/lib/pkgconfig/

3)再执行编译

上一篇下一篇

猜你喜欢

热点阅读