# 180111php编译错误

hellopasswd · · 23 次点击 · · 开始浏览    
configure: error: xml2-config not found. Please check your libxml2 installation.
[root@localhost php-5.6.30]# yum install -y libxml2-devel

configure: error: Cannot find OpenSSL's <evp.h>
[root@localhost php-5.6.30]# yum install -y openssl-devel
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/
[root@localhost php-5.6.30]# yum install -y curl-devel
If configure fails try --with-vpx-dir=<DIR>
configure: error: jpeglib.h not found.
[root@localhost php-5.6.30]# yum install -y libjpeg-devel
configure: error: png.h not found.
[root@localhost php-5.6.30]# yum install -y libpng-devel
If configure fails try --with-xpm-dir=<DIR>
configure: error: freetype-config not found.
[root@localhost php-5.6.30]# yum install -y freetype-devel
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
[root@localhost php-5.6.30]# yum install -y epel-release
[root@localhost php-5.6.30]# yum install -y libmcrypt-devel
configure: error: Please reinstall the mysql distribution
找不到任何解决方案
重新查看编译信息
错误[root@localhost php-5.6.30]# ./configure --prefix=/usr/local/php-fpm --with-config-file-path=/usr/local/php-fpm/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=/usr/local/mysql --with-mysqli=usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/locql/mysql --with-fpm-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --with-pear --with-curl --with-openssl
正确[root@localhost php-5.6.30]# ./configure --prefix=/usr/local/php-fpm --with-config-file-path=/usr/local/php-fpm/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --with-pear --with-curl --with-openssl
configure: error: Please reinstall the mysql distribution
错误--with-mysqli=usr/local/mysql/bin/mysql_config
正确--with-mysqli=/usr/local/mysql/bin/mysql_config

本文来自:开源中国博客

感谢作者:hellopasswd

查看原文:# 180111php编译错误

23 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet