Solving “Fatal Python error” after installing Zend Server

我想这是个普遍问题:在 Fedora 14 里安装了 Zend Server 以后,yum 不工作了。比如 yum update 错误提示:

Fatal Python error: pycurl: libcurl link-time version is older than compile-time version

幸好有 google 和 Fodera forum,找到一堆建议,先试了一个不管用的(python-pycurl, libcurl 两个 packages 我还是专门找了最新的版本,依然不管用)

rpm -Uvh --force http://mirror.bytemark.co.uk/fedora/linux/releases/14/Everything/x86_64/os/Packages/python-pycurl-7.19.0-7.fc14.x86_64.rpm http://mirror.bytemark.co.uk/fedora/linux/updates/14/x86_64/libcurl-7.21.0-6.fc14.x86_64.rpm

又试了一下这个管用:
1. 先把 Zend 库改个名

mv /usr/local/zend/lib /usr/local/zend/zendlib

2. 用 OS 原有的库替换 Zend 库

ln -s /usr/lib64 /usr/local/zend/lib

这时 yum 正常了,但 apache 起不来了。

3. 软链接 Zend apache2 在原位置

ln -s /usr/local/zend/zendlib/apache2 /usr/local/zend/lib/apache2

apache 正常了,但是 Zend Server web interface 里大量的错误,因为只连了 apache2,还有一大堆跟 Zend Server 相关的文件没连。是继续一个个连呢,还是?

以下是我自己的做法:
推倒前述 1,2, 3 步重来。
1. 把该死的随 Zend Server 来的 libcurl.so.4 删掉或改名

mv /usr/local/zend/lib/libcurl.so.4 /usr/local/zend/lib/libcurl.so.4.bak

这下 yum, httpd, zend server web interface 都正常。既然是 /usr/local/zend/lib/libcurl.so.4 导致 yum 有问题,删了不就行了,就这么简单。

Leave a comment

Your email address will not be published. Required fields are marked *