编译安装PHP,常见错误及解决办法

1.问题:error: xml2-config not found. Please check your libxml2 installation.
  解决:yum -y install libxml2-devel
2.问题: error: Cannot find OpenSSL's
  解决:yum install openssl openssl-devel
3.问题:error: Please reinstall the libcurl distribution -easy.h should be in /include/curl/
  解决:yum -y install curl-devel
4.问题:error: jpeglib.h not found.
  解决:yum -y install libjpeg-devel
5.问题:error: png.h not found.
  解决:yum -y install libpng-devel
6.问题:error: freetype-config not found.
  解决:yum install freetype-devel
7.问题: error: Cannot find ldap.h
  解决:yum -y install openldap-devel
8.问题:error: mcrypt.h not found. Please reinstall libmcrypt.
  解决:wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz
    tar zxf libmcrypt-2.5.7.tar.gz
    cd libmcrypt-2.5.7
    ./configure
    make && make install
9.问题:error: Don't know how to define struct flock on this system, set --enable-opcache=no
  解决:echo /usr/local/mysql/lib >> /etc/ld.so.conf.d/mysql-x86_64.conf 
    ldconfig -v

你可能感兴趣的:(编译安装PHP,常见错误及解决办法)