Ubuntu 10.04 下的php5.3 无法安装zend optimizer解决
Ubuntu 10.04 下的php5.3 无法安装zend optimizer解决方法:
必须回滚5.2.*
# remove all php packge
sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
sudo su
# use karmik for php pakage
echo -e "Package: php5\nPin: release a=karmic\nPin-Priority: 991\n" >> /etc/apt/preferences.d/php
apt-cache search php5-|grep php5-|awk '{print "Package:", $1,"\nPin: release a=karmic\nPin-Priority: 991\n"}' >> /etc/apt/preferences.d/php
apt-cache search -n libapache2-mod-php5 |awk '{print "Package:", $1,"\nPin: release a=karmic\nPin-Priority: 991\n"}' >> /etc/apt/preferences.d/php
exit
# add karmik to source list
sed s/lucid/karmic/g /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.d/karmic.list
# update package database (use apt-get if aptitude crash)
sudo apt-get update
# install php
sudo apt-get install -t karmic php5-cli libapache2-mod-php5
再去
wget http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
解压后直接拷贝
最后在php的php.ini下最后把zend的动态库路径加上
重启apache
OK