2

I am trying to install gearman http://www.phpvs.net/2010/11/30/installing-gearman-and-gearmand-on-windows-with-cygwin/

I downloaded "libevent-2.0.21-stable.tar.gz" and extracted in cygwin's home/libs directory (I created a libs directory myself) where there is also "gearmand-1.1.5". Then, inside the libevent directory I did:

./configure
make
make install

After installing libevent, I changed to gearman directory and did:

./configure

This resulted in "configure: error: Unable to find libevent". Any ideas? Thanks.

LihO
  • 41,190
  • 11
  • 99
  • 167
Sukhrob
  • 901
  • 4
  • 12
  • 34

3 Answers3

0

A moment ago, I solved this problem. It's because when we complete to compile "libevent", it will generate the lib files in ./usr/local/lib. This path is not contained in environment variable——PATH. So, we have to copy it to "usr/local/bin", and then, it works well...

Rohitashv Singhal
  • 4,517
  • 13
  • 57
  • 105
0
yum install libevent-devel

And then configure and make

As answered here: https://unix.stackexchange.com/questions/33368/trying-to-install-gearman-on-centos-and-configure-cannot-find-event-h-even-th

Community
  • 1
  • 1
Ashik
  • 317
  • 3
  • 12
0

For me:

  1. I installed Cygwin in C:\cygwin64\
  2. downloaded libevent-2.0.22-stable into C:\cygwin64\home\user1

    cd libevent-2.0.22-stable
    ./configure
    make
    make install
    

    -this creates .libs folder and fills it with created output

  3. I copied everything from C:\cygwin64\home\user1\libevent-2.0.22-stable\.libs
    into C:\cygwin64\lib but moved the .dll files into C:\cygwin64\bin

  4. I downloaded C:\cygwin64\home\user1\gearmand-1.1.12 and same trick again:

    cd gearmand-1.1.12
    ./configure
    make
    make install
    

Hope this helps. You might want to also check this:
How can i install gearman php extension on Windows OS?

UPDATE: note, you might need to go for lower version, as higher ones can have some compilation problems, see https://gist.github.com/mnapoli/5270256

UPDATE 2: it's insanely hard to get the PECL extension work on Windows, and I've ended with this neat trick: get PEAR to work, then get pear install Net_Gearman-0.2.3 and in code that uses class GearmanClient:

require_once("Net/Gearman/Client.php");
use Net_Gearman_Client as GearmanClient;

... new GearmanClient([$serverId]);
LihO
  • 41,190
  • 11
  • 99
  • 167