• 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  

  • 相关阅读:
    总结:python
    Create form:class CreateWindow(Form)
    create sheets: ViewSheet.Create(doc, titleblock.Id)
    create a wall:Wall.Create(doc, line, baseLevel.Id, False)
    creat floor
    excel导入
    Vim正则通配符使用心得
    SVN仓库迁移到Git的完美解决办法
    SVN仓库迁移到Git遇到的两个问题和解决办法
    PGI Compiler for OpenACC Output Syntax Highlighting
  • 原文地址:https://www.cnblogs.com/xingmeng/p/3221258.html
Copyright © 2020-2023  润新知