zoukankan      html  css  js  c++  java
  • php编译错误Note that the MySQL client library is not bundled anymore或者cannot find mysql header file

    rpm -ivh MySQL-devel-community-5.1.57-1.sles10.x86_64.rpm 

    export PATH=/usr/local/services/libxml2-2.7.2/bin:$PATH    

    cp /usr/lib64/mysql/libmysqlclient.so.15.0.0  /usr/lib/libmysqlclient.so 

     

    ./configure --prefix=/usr/local/services --with-mysql=/usr/include/mysql/ --with-curl=/usr/local/services/curl-7.15.0 --with

     

    -libxml-dir=/usr/local/services/libxml2-2.7.2  --enable-fastcgi --enable-fpm --with-mcrypt=/usr/local/services/libmcrypt-

     

    2.5.8 --with-zlibwhere

     

    make 

    make install

     

     

    /////////////////////////////////////

     

    php编译错误Note that the MySQL client library is not bundled anymore! 

    ##### install php

    ##download http://jp.php.net/downloads.php

    wget http://jp.php.net/get/php-5.2.9.tar.gz/from/this/mirror

    rpm -qa | grep php

    rpm -e php-ldap-5.1.6-20.el5 php-5.1.6-20.el5

     

    tar -zxvf php-5.2.9.tar.gz

    cd php-5.2.9

    ./configure --prefix=/usr/local/php --with-mysql=/usr/local/src/mysql-5.1.14-beta-linux-i686-glibc23/include/ --with-

     

    apxs2=/usr/local/apache2/bin/apxs

    到最后报错:

    configure: error: Cannot find MySQL header files under /usr/local/src/mysql-5.1.14-beta-linux-i686-glibc23/include/.

    Note that the MySQL client library is not bundled anymore!

     

    解决方法。

    1. 查看系统有没有安装mysql header

    find / -name mysql.h

    如果有。请指定--with-mysql=/跟正常路径。

    如果没有。请看下一步。

     

    2.redhat安装

    rpm -ivh MySQL-devel-community-5.1.33-0.rhel5.i386.rpm

     

    3.最后一步php的配置选项添加--with-mysql=/usr即可!

     

    完整的编译参数:

     

    /configure --with-apxs2=/usr/local/apache2/bin/apxs --includedir=/usr/local/include --enable-force-cgi-redirect --enable-

     

    mailparse --enable-mbstring --enable-mbregex --enable-mbstr-enc-trans --enable-trans-sid --enable-shmop --enable-exif --with

     

    -gd --with-jpeg-dir=/usr/local/lib/ --with-png-dir=/usr/local/lib/ --with-zlib-dir=/usr/include/ --enable-gd-native-ttf --

     

    enable-gd-jis-conv --with-pgsql=/usr/local/pgsql --with-mysql=/usr/local/mysql --enable-sockets --enable-ftp --with-

     

    curl=/usr/local/ --enable-memcache --enable-openssl  

  • 相关阅读:
    Oracle备份恢复之无备份情况下恢复undo表空间
    Oracle HA 之 测试RAC的功能
    (转)Python——functools
    (转)Python标准库:内置函数print(*objects, sep=' ', end=' ', file=sys.stdout, flush=False)
    (转)用Python写堡垒机项目
    (转)Python进阶:函数式编程(高阶函数,map,reduce,filter,sorted,返回函数,匿名函数,偏函数)
    (转)Linux中的位图
    (转)Python标准库02 时间与日期 (time, datetime包)
    (转)Python 3 collections.defaultdict() 与 dict的使用和区别
    (转)python高级:列表解析和生成表达式
  • 原文地址:https://www.cnblogs.com/xingmeng/p/3221258.html
Copyright © 2011-2022 走看看