为什么80%的码农都做不了架构师?>>>
问题1:
再次./configure以下错误发生
configure: error: xml2-config not found. Please check your libxml2 installation.
解决方法:
安装libxml2
# yum install libxml2-devel
问题2:
hecking libxml2 install dir... no
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... no
configure: error: build test failed. Please check the config.log for details.
解决方法:
# yum erase zlib-devel
# yum install zlib-devel
# yum install libxml2-devel
php 5.2.3+mysqli 安装与常见错误 总结
--with-mysql=/usr/local/mysql \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
cd /root/tmp/php-5.2.3/ext/mysqli
#####进入到mysqli的目录。
/usr/local/bin/phpize
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
#./configure --prefix=/usr/local/mysqli --with-php-config=/usr/local/bin/php-config --with-mysqli=/usr/bin/mysql_config
make install
加上一句:
extension=/usr/local/lib/php/extensions/no-debug-non-zts-20060613/mysqli.so
/root/tmp/php-5.2.3/ext/mysqli/mysqli.c: In function 'zm_startup_mysqli':
/root/tmp/php-5.2.3/ext/mysqli/mysqli.c:637: error: 'MYSQL_RPL_MASTER' undeclared (first use in this function)
/root/tmp/php-5.2.3/ext/mysqli/mysqli.c:637: error: (Each undeclared identifier is reported only once
/root/tmp/php-5.2.3/ext/mysqli/mysqli.c:637: error: for each function it appears in.)
/root/tmp/php-5.2.3/ext/mysqli/mysqli.c:638: error: 'MYSQL_RPL_SLAVE' undeclared (first use in this function)
/root/tmp/php-5.2.3/ext/mysqli/mysqli.c:639: error: 'MYSQL_RPL_ADMIN' undeclared (first use in this function)
*** Error code 1
cd /usr/include/mysql
root@www[/usr/include/mysql]# vi mysql.h
在第221行
... ...
enum mysql_protocol_type
{
MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
};
/*
There are three types of queries - the ones that have to go to
the master, the ones that go to a slave, and the adminstrative
type which must happen on the pivot connectioin
*/
#添加下面的4行
enum mysql_rpl_type
{
MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
};
/root/tmp/php-5.2.3/ext/mysqli/mysqli_api.c:144: error: 'gptr' undeclared (first use in this function)
/root/tmp/php-5.2.3/ext/mysqli/mysqli_api.c:144: error: (Each undeclared identifier is reported only once
/root/tmp/php-5.2.3/ext/mysqli/mysqli_api.c:144: error: for each function it appears in.)
/root/tmp/php-5.2.3/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_stmt_execute':
/root/tmp/php-5.2.3/ext/mysqli/mysqli_api.c:603: error: 'gptr' undeclared (first use in this function)
make: *** [mysqli_api.lo] 错误 1
vi mysqli_api.c
测试Mysqli运行状况:
$mysqli = new mysqli("localhost", "my_user", "my_password", "dbname");
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
configure: error: libjpng.(a|so) not found
其实也是和刚才的一样.
cp -frp /usr/lib64/libpng* /usr/lib/