Chinaunix

标题: php安装 mysqli模块,make错误:make: *** [mysqli.lo] Error 1 [打印本页]

作者: xihuineng    时间: 2016-01-27 10:08
标题: php安装 mysqli模块,make错误:make: *** [mysqli.lo] Error 1
/bin/sh /home/php-5.5.30/ext/mysqli/libtool --mode=compile cc  -I. -I/home/php-5.5.30/ext/mysqli -DPHP_ATOM_INC -I/home/php-5.5.30/ext/mysqli/include -I/home/php-5.5.30/ext/mysqli/main -I/home/php-5.5.30/ext/mysqli -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -I/usr/local/mysql/include/mysql  -DHAVE_CONFIG_H  -g -O2   -c /home/php-5.5.30/ext/mysqli/mysqli.c -o mysqli.lo
cc -I. -I/home/php-5.5.30/ext/mysqli -DPHP_ATOM_INC -I/home/php-5.5.30/ext/mysqli/include -I/home/php-5.5.30/ext/mysqli/main -I/home/php-5.5.30/ext/mysqli -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -I/usr/local/mysql/include/mysql -DHAVE_CONFIG_H -g -O2 -c /home/php-5.5.30/ext/mysqli/mysqli.c  -fPIC -DPIC -o .libs/mysqli.o
In file included from /usr/local/mysql/include/mysql/my_global.h:86,
                 from /home/php-5.5.30/ext/mysqli/php_mysqli_structs.h:63,
                 from /home/php-5.5.30/ext/mysqli/mysqli.c:34:
/usr/local/mysql/include/mysql/my_config.h:1173:1: warning: "PACKAGE_NAME" redefined
In file included from /home/php-5.5.30/ext/mysqli/mysqli.c:24:
/home/php-5.5.30/ext/mysqli/config.h:56:1: warning: this is the location of the previous definition
In file included from /usr/local/mysql/include/mysql/my_global.h:86,
                 from /home/php-5.5.30/ext/mysqli/php_mysqli_structs.h:63,
                 from /home/php-5.5.30/ext/mysqli/mysqli.c:34:
/usr/local/mysql/include/mysql/my_config.h:1176:1: warning: "PACKAGE_STRING" redefined
In file included from /home/php-5.5.30/ext/mysqli/mysqli.c:24:
/home/php-5.5.30/ext/mysqli/config.h:59:1: warning: this is the location of the previous definition
In file included from /usr/local/mysql/include/mysql/my_global.h:86,
                 from /home/php-5.5.30/ext/mysqli/php_mysqli_structs.h:63,
                 from /home/php-5.5.30/ext/mysqli/mysqli.c:34:
/usr/local/mysql/include/mysql/my_config.h:1179:1: warning: "PACKAGE_TARNAME" redefined
In file included from /home/php-5.5.30/ext/mysqli/mysqli.c:24:
/home/php-5.5.30/ext/mysqli/config.h:62:1: warning: this is the location of the previous definition
In file included from /usr/local/mysql/include/mysql/my_global.h:86,
                 from /home/php-5.5.30/ext/mysqli/php_mysqli_structs.h:63,
                 from /home/php-5.5.30/ext/mysqli/mysqli.c:34:
/usr/local/mysql/include/mysql/my_config.h:1182:1: warning: "PACKAGE_VERSION" redefined
In file included from /home/php-5.5.30/ext/mysqli/mysqli.c:24:
/home/php-5.5.30/ext/mysqli/config.h:65:1: warning: this is the location of the previous definition
/home/php-5.5.30/ext/mysqli/mysqli.c:321: error: expected ';', ',' or ')' before '*' token
/home/php-5.5.30/ext/mysqli/mysqli.c:364: error: expected ';', ',' or ')' before '*' token
/home/php-5.5.30/ext/mysqli/mysqli.c:413: error: expected ';', ',' or ')' before '*' token
/home/php-5.5.30/ext/mysqli/mysqli.c: In function 'mysqli_object_get_debug_info':
/home/php-5.5.30/ext/mysqli/mysqli.c:473: warning: assignment makes pointer from integer without a cast
/home/php-5.5.30/ext/mysqli/mysqli.c: In function 'zm_startup_mysqli':
/home/php-5.5.30/ext/mysqli/mysqli.c:624: error: 'mysqli_read_property' undeclared (first use in this function)
/home/php-5.5.30/ext/mysqli/mysqli.c:624: error: (Each undeclared identifier is reported only once
/home/php-5.5.30/ext/mysqli/mysqli.c:624: error: for each function it appears in.)
/home/php-5.5.30/ext/mysqli/mysqli.c:625: error: 'mysqli_write_property' undeclared (first use in this function)
/home/php-5.5.30/ext/mysqli/mysqli.c:627: error: 'mysqli_object_has_property' undeclared (first use in this function)
make: *** [mysqli.lo] Error 1




请问怎么解决 ,网上的方法都试过了,没用。
作者: ccjsj1    时间: 2016-01-27 12:22
回复 1# xihuineng

可能没安装mysql的头文件(mysql-devel),安装这个(yum -y install mysql-devel)后再重试下。
   
作者: xihuineng    时间: 2016-01-27 13:49
还是这样的错误,这个之前装过mysql-devel了, 各位大神都没碰到过么?  

./configure --prefix=/usr/local/mysqli \
--with-php-config=/usr/local/php/bin/php-config \
--with-mysqli=/usr/local/mysql/bin/mysql_config  
编译安装没有问题,提示是这样
。。。。。。
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
作者: ccjsj1    时间: 2016-01-28 10:35
本帖最后由 ccjsj1 于 2016-01-28 10:37 编辑

回复 3# xihuineng
没遇到过这样的问题,不能yum安装吗?
像是版本不兼容问题导致,介绍下系统版本、php版本、mysql版本、安装方法,看这边是否有环境试下。

   




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2