X86_64编译安装PHP ,mysql configure failed.
2012-05-08 18:47
204 查看
好久没有编译安装过php了,为了玩nginx.没法子,编译一次来测试.我加的编译的参数是:
# ./configure --prefix=/usr/local/php --with-config-file-path=/etc --with-gd --enable-gd-native-ttf --with-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --disable-debug --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-force-cgi-redirect --enable-mbstring --with-mcrypt
没想到老是出下面的错
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.
google很久,都讲下面的答案,晕,这种也叫答案,那我不是还要重新编译一次mysql.这个php就很麻烦了.这个一定不对.
网查找说:安装PHP的时候没有指定一下mysql的安装目录。但是我已经指定了,所以这个说法是错误的,其实主要原因是 mysql-level没有装,也就是mysql的版本不对,应该换
mysql-max-5.0.21版本(包含所有mysql相关内容的软件包)
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 59854 "configure"
#include "confdefs.h"
在看看config.log提示的错....哦.原来是版本有问题.想起我的系统都是X86的,lib都是64位的.所以解决方法很容易.
这个libmysqlclient.a library 是在 /usr/lib64/mysql, 不是在 /usr/lib/mysql.
所以可以做下面的方法来解决
#export LDFLAGS=-L/usr/lib64/mysql
OR
请将Makefile里面的
-L/usr/lib/mysql
改为
-L/usr/lib64/mysql
# ./configure --prefix=/usr/local/php --with-config-file-path=/etc --with-gd --enable-gd-native-ttf --with-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --disable-debug --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-force-cgi-redirect --enable-mbstring --with-mcrypt
没想到老是出下面的错
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.
google很久,都讲下面的答案,晕,这种也叫答案,那我不是还要重新编译一次mysql.这个php就很麻烦了.这个一定不对.
网查找说:安装PHP的时候没有指定一下mysql的安装目录。但是我已经指定了,所以这个说法是错误的,其实主要原因是 mysql-level没有装,也就是mysql的版本不对,应该换
mysql-max-5.0.21版本(包含所有mysql相关内容的软件包)
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 59854 "configure"
#include "confdefs.h"
在看看config.log提示的错....哦.原来是版本有问题.想起我的系统都是X86的,lib都是64位的.所以解决方法很容易.
这个libmysqlclient.a library 是在 /usr/lib64/mysql, 不是在 /usr/lib/mysql.
所以可以做下面的方法来解决
#export LDFLAGS=-L/usr/lib64/mysql
OR
请将Makefile里面的
-L/usr/lib/mysql
改为
-L/usr/lib64/mysql
相关文章推荐
- 编译安装PHP出现configure: error: MySQL configure failed. Please check config.log的解决方法
- 编译安装PHP出现configure: error: mysql configure failed. Please check config.log的解决方法
- 编译安装php-5.6.19出现的问题configure: error: mysql configure failed. Please check config.log
- RHEL6.3_x86_64 下源码安装Apache(2.2.5)MySQL(5.5.25a) PHP(5.2.17)
- 安装centos 5下编译安装PHP时报错configure: error: Cannot find MySQL header files under
- linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.
- 亲测CentOS 6.6 x86_64下源码安装LAMP平台(APACHE 2.4.16+MYSQL 5.6.17+PHP 5.6.7)
- 64位centos上nginx,php编译安装遇configure: error: Cannot find libmysqlclient under /usr 错误解决
- PHP: configure: error: mysql configure failed. Please check config.log for more information.
- php安装报错:PHP configure: error: build test failed. Please check the config.log
- linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.
- 安装PHPfailed---configure: error: build test failed. Please check the config.log for details
- CentOS5 Linux编译PHP 报 mysql configure failed 错误解决办法
- php安装报错:PHP configure: error: build test failed. Please check the config.log
- php 安装 configure: error: Cannot find libmysqlclient under /usr. 解决
- linux下面安装PHP时,提示:configure: error: Cannot find MySQL header files
- Apache-2.0.45+php-4.3.1+mysql-4.1.0 在 Solaris 9.0 for x86 下的安装说明
- yum php56w_x86_64 后的 php-mysql 安装问题报错问题
- CentOS 5.4 服务器配置 yum安装Apache+php+Mysql+phpmyadmin
- CentOS 6.4安装配置LNMP服务器(Nginx+PHP+MySQL)