之前在较新版本的CentOS上安装gearman没有发现什么问题,但这次是在公司开发服上安装gearman,由于使用CentOS release 5.6版本,较旧,导致出现很多问题,今天仅仅把错误记录上来,以下是错误信息:
>make
gearman.h:53:27: error: tr1/cinttypes: No such file or directory
#原因是g++ ,gcc版本过低
>yum install gcc44 gcc44-c++ libstdc++44-devel -y
#安装完后重新configure就可以了
>./configure --prefix=/usr/local/gearman
error: 'sqlite3_prepare_v2' was not declared in this scope
#重新安装sqlite3
>./configure --prefix=/usr/local/gearman --with-sqlite3=/usr/local/sqlite3
./gearmand: error while loading shared libraries: libboost_program_options.so.1.54.0: cannot open shared object file: No such file or directory
#将旧版本的boost删除,重新安装boost
#将/home/www/luwujun/boost/boost_1_44_0/stage/lib复制到/usr/local/lib和/usr/lib下
#将/home/www/luwujun/boost/boost_1_44_0/boost复制到/usr/local/include下
>./bootstrap.sh
>./bjam
./configure --prefix=/usr/local/gearman --with-sqlite3=/usr/local/sqlite3 --with-boost=/home/www/luwujun/boost/boost_1_44_0
问题:Address family not supported by protocol
sudo ./gearmand -L 0.0.0.0 -d
#安装gearman php扩展
configure: error: Please install libgearman
只要加上--with-gearman
./configure --with-php-config=/usr/local/php/bin/php-config --with-gearman=/usr/local/gearman
/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/