CentOS 7 通过源码安装 re2c 最新版,解决 configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers 问题。


yum -y install git automake gcc+ gcc-c++ libtool


git clone https://github.com/skvadrik/re2c.git re2c
cd re2c
mkdir -p m4
./autogen.sh && ./configure --prefix=/usr && make
sudo make install

备用下载地址: https://down.24kplus.com/linux/re2c-1.1.1.tar.gz


re2c -v

re2c 1.1.1


解决 error: the HTTP XSLT module requires the libxml2/libxslt 错误

yum -y install libxml2 libxml2-dev
yum -y install libxslt-devel

解决 error: the HTTP image filter module requires the GD library. 错误

yum -y install gd-devel

解决 error: the GeoIP module requires the GeoIP library. 错误

yum -y install GeoIP GeoIP-devel GeoIP-data

解决 error: the Google perftools module requires the Google perftools 错误

yum -y install gperftools

解决 error: libatomic_ops library was not found. 错误

yum -y install libuuid-devel libblkid-devel libudev-devel fuse-devel libedit-devel libatomic_ops-devel

解决 error trying to exec 'cc1plus': execvp: No such file or directory 错误

yum -y install gcc-c++

解决 error: [pool www] cannot get uid for user 'www-data' 错误

groupadd www-data
useradd -g www-data www-data

解决configure: error: mbed TLS libraries not found. 错误。


解决 error: Cannot find OpenSSL's <evp.h> 错误

yum install openssl openssl-devel
ln -s /usr/lib64/libssl.so /usr/lib/

解决 error: Libtool library used but 'LIBTOOL' is undefined 错误

yum install libtool

解决 exec: g++: not found 错误

yum -y update gcc
yum -y install gcc+ gcc-c++

解决 configure: error: tss lib not found: libtspi.so 错误

yum install trousers-devel

解决 Can't exec "autopoint": No such file or directory 错误

yum install gettext gettext-devel gettext-common-devel

解决 configure: error: libcrypto not found. 错误

yum remove openssl-devel
yum -y install openssl-devel

解决 configure: error: Package requirements (libffi >= 3.0.0) were not met: No package 'libffi' found 错误

yum install libffi-devel

解决 fatal error: uuid.h: No such file or directory 错误

yum install e2fsprogs-devel uuid-devel libuuid-devel

解决 configure: error: openssl lib not found: libcrypto.so 错误

yum install openssl-devel

解决 tar (child): lbzip2: Cannot exec: No such file or directory 错误

yum -y install bzip2

解决 configure: error: C++ preprocessor "/lib/cpp" fails sanity check 错误

yum install gcc-c++

解决 configure: error: Please reinstall the BZip2 distribution 错误

yum install bzip2 bzip2-devel

解决 configure: error: cURL version 7.15.5 or later is required to compile php with cURL support 错误

yum install curl-devel

解决 configure: error: not found. Please provide a path to MagickWand-config or Wand-config program 错误

yum install ImageMagick-devel

解决 configure: error: no acceptable C compiler found in $PATH 错误

yum install gcc

解决 configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met: 错误

yum install libicu-devel

解决 configure: error: Package requirements (sqlite3 > 3.7.4) were not met: No package 'sqlite3' found 错误

yum install sqlite-devel

解决 configure: error: Package requirements (oniguruma) were not met: No package 'oniguruma' found 错误

yum install oniguruma oniguruma-devel

解决configure: error: The Sodium crypto library libraries not found.错误。


wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable.tar.gz
tar -zxf libsodium-1.0.18-stable.tar.gz
cd libsodium-stable



./configure --prefix=/usr
make && make check
sudo make install
sudo ldconfig


config.status: error: Something went wrong bootstrapping makefile fragments
     for automatic dependency tracking.  Try re-running configure with the
     '--disable-dependency-tracking' option to at least be able to build
     the package (albeit without support for automatic dependency tracking). 


yum install make -y


CentOS 7/8 源码安装 mbedtls 2.16.3, 解决configure: error: mbed TLS libraries not found. 错误。


wget https://tls.mbed.org/download/mbedtls-2.16.3-gpl.tgz
tar -xf mbedtls-2.16.3-gpl.tgz
cd mbedtls-2.16.3



make DESTDIR=/usr install

如果出现 make[1]: python2: Command not found 错误,执行:

yum -y install python2

如果出现 /usr/bin/env: ‘perl’: No such file or directory 错误,执行:

yum -y install perl