php-fpm启动报错:libgearman.so.8: No such file or directory in Unknown on line 0

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php-fpm启动报错:libgearman.so.8: No such file or directory in Unknown on line 0相关的知识,希望对你有一定的参考价值。

从一台服务器上拷贝php-fpm程序到另一台后启动提示错误:

/etc/init.d/php-fpm-5.4 start
Starting php-fpm [27-Jul-2017 11:31:39] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library ‘/usr/local/php54/lib/php/extensions/no-debug-non-zts-20100525/gearman.so‘ - libgearman.so.8: cannot open shared object file: No such file or directory in Unknown on line 0
 done

看错误提示是找不到libgearman.so.8

开始是怀疑直接拷贝的gearman.so扩展不能用,从网上下载gearman重新编译:

下载最新版本:
$ wg 
$ tar zxvf gearman-1.1.1.tgz
$ cd gearman-1.1.1/
$ phpize
$ ./configure --with-php-config=/usr/local/php/bin/php-config
$ make
$ make install

make过程中有错误:

configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable gearman support... yes, shared
not found

提示需要安装libgearman,到这里才知道问题出在哪里,直接yum安装libgearman

yum install libgearman
...
....
.....
Dependencies Resolved

========================================================================================================================
 Package                        Arch                     Version                           Repository              Size
========================================================================================================================
Installing:
 libgearman                     x86_64                   1.1.8-2.el6                       epel                    70 k
Installing for dependencies:
 boost-system                   x86_64                   1.41.0-28.el6                     base                    26 k

Transaction Summary
========================================================================================================================
Install       2 Package(s)
...                                                                 2/2 
....
.....
Installed:
  libgearman.x86_64 0:1.1.8-2.el6                                                                                       

Dependency Installed:
  boost-system.x86_64 0:1.41.0-28.el6                                                                                   

Complete!

可以安装,直接安装后重启php-fpm服务,没有提示错误。解决。

/etc/init.d/php-fpm-5.4 restart
Gracefully shutting down php-fpm . done
Starting php-fpm  done



以上是关于php-fpm启动报错:libgearman.so.8: No such file or directory in Unknown on line 0的主要内容,如果未能解决你的问题,请参考以下文章

mac 启动php-fpm报错 failed to open configuration file '/private/etc/php-fpm.conf': No such file

docker-compose启动php-fpm报错问题

php-fpm开启报错-ERROR: An another FPM instance seems..

mac 自带php-fpm开启报错归纳

nginx 报错 connect() failed (111: Connection refused) while connecting to upstream

PHP-FPM安装报错解决