Windows cygwin gearman/配置节目”;configure:error:找不到libevent&quo


Windows cygwin gearman ./configure shows "configure: error: Unable to find libevent" error

我正在尝试安装gearmanhttp://www.phpvs.net/2010/11/30/installing-gearman-and-gearmand-on-windows-with-cygwin/

我下载了"libevent-2.0.21-stable.tar.gz",并在cygwin的home/libs目录中提取(我自己创建了一个libs目录(,其中还有"gearmand-1.1.5">

./configure
make
make install

安装libevent后,我改为gearman目录并执行以下操作:

./configure

这导致"配置:错误:找不到libevent"。有什么想法吗?谢谢

刚才,我解决了这个问题。这是因为当我们完成编译"libevent"时,它将在中生成lib文件/usr/local/lib。此路径不包含在环境变量----path中。所以,我们必须将它复制到"usr/local/bin",然后,它就可以正常工作了。。。

yum install libevent-devel

然后配置并制作

正如这里所回答的:https://unix.stackexchange.com/questions/33368/trying-to-install-gearman-on-centos-and-configure-cannot-find-event-h-even-th

对我来说:

  1. 我在C:'cygwin64'中安装了Cygwin
  2. 下载libevent-2.0.22-stableC:'cygwin64'home'user1

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

    -这将创建.libs文件夹,并用创建的输出填充该文件夹

  3. 我从C:'cygwin64'home'user1'libevent-2.0.22-stable'.libs复制了所有内容
    进入C:'cygwin64'lib,但将.dll文件移动到C:'cygwin64'bin

  4. 我下载了C:'cygwin64'home'user1'gearmand-1.1.12和同样的技巧:

    cd gearmand-1.1.12
    ./configure
    make
    make install
    

希望这能有所帮助。您可能还需要检查以下内容:
如何在Windows操作系统上安装gearman php扩展?

更新:注意,您可能需要使用较低版本,因为较高版本可能会有一些编译问题,请参阅https://gist.github.com/mnapoli/5270256

更新2:在Windows上让PECL扩展工作非常困难,我用这个巧妙的技巧结束了:让PEAR工作,然后得到pear install Net_Gearman-0.2.3,在使用类GearmanClient:的代码中

require_once("Net/Gearman/Client.php");
use Net_Gearman_Client as GearmanClient;
... new GearmanClient([$serverId]);