安装 PHP 时出错
来源:互联网 发布:java定义枚举类 编辑:程序博客网 时间:2024/05/02 03:01
安装 PHP 时,刚执行 ./php.config.sh
checking for MSSQL support via FreeTDS.. no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /tmp/mysql.sock
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore.
解法:
如果不知道 header file 在哪,用 「find / -name mysql.h」命令找出其位置;
如果是自己也有手動安裝 MySQL 套件的話,直接指定該位置。
在 ./configure 下参数指定 header file 的位置(即mysql安装目录),如下:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config
如果依然提示找不到mysql_config提示:
checking for mysql_config... /usr/bin/mysql_config is not a directory
configure: error: can not find mysql under the /usr/bin/mysql_config that you specified
则cp /usr/local/mysql/bin/mysql_config /usr/bin/mysql_config
php.config.sh的编译参数如下:
#! /bin/sh
ulimit -HSn 65536
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"; CXXFLAGS="$CFLAGS" ;export CFLAGS CXXFLAGS
#LDFLAGS="-L/usr/lib64 -L/lib64"; export LDFLAGS
./configure --enable-inline-optimization --disable-debug --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-apxs2=/usr/local/apache2/bin/apxs --with-iconv --with-curl --enable-mbstring --enable-sockets --with-png-dir --with-jpeg-dir=/usr/local/jpeg6/lib --with-freetype-dir --with-gd --with-libxml-dir=/usr --enable-xml --enable-zip --with-zlib-dir --with-gettext --enable-pdo --with-pdo-sqlite --with-pdo-mysql=/usr/bin/mysql_config --enable-calendar --enable-ftp --with-pcre-regex --disable-ipv6 --enable-soap
- 安装 PHP 时出错
- PHP安装问题:编译安装php5.2.0时出错解决方案
- PHP 扩展安装出错
- PHP安装扩展,php-config出错
- LAMP源码安装之一---PHP安装出错
- ffmpeg ffmpeg-php 安装及出错解决办法()
- ffmpeg ffmpeg-php 安装及出错解决办法
- ubuntu php composer 安装laravel出错
- Ubuntu安装php的时候出错
- osx安装php mongo扩展出错解决方法
- No package php-mcrypt available 引发的yum源解决方法(安装php时出错)
- vs2003安装时出错
- 安装VS2008时出错。
- oracle安装时出错
- VmWare安装时出错
- 使用pecl安装php扩展时出错-bash: pecl: command not found
- 安装SQLSERVER2000个人版时出错
- 编译安装PCRE时出错
- 小时钟
- kill、killall与linux信号处理
- 刚开始玩CSDN的感受
- 【WitchHat.cn心得】Silverlight中,即使使用HttpWebRequest也抛System.Security.SecurityException
- STL最简单的一例
- 安装 PHP 时出错
- 快速计算子网掩码的方法
- .net异步编程
- 天使的诱惑
- 一个关于分页的数据和显示分离的设计
- php基础语法
- vim 正则表达式
- java.util.Scanner 中一段代码的注释
- tracert