undefined symbol:_zend_list_delete问题

许多朋友在装apache并使其支持php时,可能会遇到undefined symbol: _zend_list_delete的错误。

这是装了apache和php后,apache的配置文件httpd.conf中有启动php模块的语句

LoadModule php5_module        modules/libphp5.so

而libphp5.so运行时找不到zend_list函数相关的库导致的。我从国外网站查了一些解决办法。我自己的办法是:装php时configure 加上--libdir=/usr/lib形如:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pear --with-mysql=/usr/local/mysql --libdir=/usr/lib

下面是国外网站上查的一些解决办法,请因你情况修改。

The problem is with mysql... doesn't seem obvious but this has happened
to a number of users...

Here is a fix, hopefully your mysql directories are the same
cd /usr/lib/mysql
rename .a .a_old *.a
rename .la .la_old *.la

Then run configure/make/make install

Then rename these files back.

cd /usr/lib/mysql
rename .a_old .a *.a_old
rename .la_old .la *.la_old
-----------------------------------------------

there may be some problem with the path to libc and other libs on your system.
per default php5 s configure script uses /usr/local/lib.
you might want to add some --libdir=/usr/lib to your ./configure
like
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pear --with-mcrypt --with-mysql --libdir=/usr/lib

to be sure it uses the new path do some
make clean
make distclean

before recompiling.

if /usr/lib doesent work you may look for your systems default library direcotry :)
----------------------------------------------------------------------------------------

1. Cleaned the hard drive of anything looking remotely like PHP, MySQL or Apache.
2. Built Apache 2.0.58
3. Built MySQL 5
4. Used that solution above (the one about renaming the libs; the lib files for mysql 5 is located in /usr/local/mysql/libs/mysql/)
5. Deleted the folder I used to build PHP 5, and then unarchived a fresh copy from my php-5.1.4.tar.gz file.
6. Built PHP 5
7. Named the files back as per instruction above

This got ride of all the errors, so all I can say to anybody else who is unlucky enough to get them is, clean everything that is Apache, MySQL or PHP, and then start over. That seemed to work. :)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值