首页 > 数据库技术 > 详细

源码安装php提示Cannot find libmysqlclient under /usr/local/mysql

时间:2015-03-24 19:30:28      阅读:294      评论:0      收藏:0      [点我收藏+]

    环境介绍:

    Centos 5.7,源码安装了MySQL,Nginx;

    使用源码编译安装php5.5.23,步骤如下:

    shell>./configure --prefix=/usr/local/php-5.5.23 --with-config-file-path=/usr/local/php-5.5.23/etc --with-bz2 --with-curl --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-iconv-dir=/usr/local --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir=/usr/local --with-zlib --with-mysql=/usr/local/mysql --enable-mysqlnd --enable-dom --enable-xml --enable-fpm --with-libdir

    提示错误如下:Cannot find libmysqlclient under /usr/local/mysql

    在/usr/loca/mysql/lib/下确实有需要libmysqlclient文件,故手动修改--with-mysql=/usr/local/mysql/lib

    在此执行,又提示错误Cannot find MySQL header files under /usr/local/mysql/lib/

    无奈之下,直接不写路径了

    shell>./configure --prefix=/usr/local/php-5.5.23 --with-config-file-path=/usr/local/php-5.5.23/etc --with-bz2 --with-curl --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-iconv-dir=/usr/local --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir=/usr/local --with-zlib --with-mysql --enable-mysqlnd --enable-dom --enable-xml --enable-fpm --with-libdir

    编译成功了

    

本文出自 “星空孤魂” 博客,请务必保留此出处http://mysqldba.blog.51cto.com/6728219/1623868

源码安装php提示Cannot find libmysqlclient under /usr/local/mysql

原文:http://mysqldba.blog.51cto.com/6728219/1623868

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!