Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to install gearman on my Ubuntu12.04 machine. I have upgraded php to version 5.4 via the ppa php5-oldstable. I downloaded the source of gearmand-1.1.12 and compiled it and installed it using pecl.

I then created a /etc/php5/conf.d/gearman.ini containing

extension=gearman.so

When I then run a php script trying to output the version of gearman I get the following response:

$ php gearman_version.php 
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/gearman.so' - /usr/lib/php5/20100525/gearman.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Fatal error:  Call to undefined function gearman_version() in /home/dev/gearman_version.php on line 2
PHP Stack trace:
PHP   1. {main}() /home/dev/gearman_version.php:0

Looking in the /usr/lib/php5 folder I realized I have both

tree /usr/lib/php5/20100525/
/usr/lib/php5/20100525/
├── apc.so
├── curl.so
├── imagick.so
├── intl.so
├── mysqli.so
├── mysql.so
├── pdo_mysql.so
├── pdo.so
├── pdo_sqlite.so
├── sqlite3.so
├── xdebug.so
└── xsl.so

and

$tree /usr/lib/php5/20090626/gearman.so 
/usr/lib/php5/20090626/gearman.so

So it seems I have compiled against a wrong api version. How to compile it correctly?

share|improve this question
    
I found a duplicate question on stackoverflow. This answer there provided a solution: stackoverflow.com/a/20886576/457268 –  k0pernikus May 1 at 11:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.