- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我拼命想让 Gearman PHP 扩展在 Debian 6 上运行。
我有所有的二进制文件和源代码
root@debian:/tmp/pear/install# aptitude search gearman
i gearman - A distributed job queue
i A gearman-job-server - Job server for the Gearman
i gearman-tools - Tools for the Gearman
i libgearman-dev - Development files for the
i libgearman4 - Library providing Gearman
...但是当 PHP 扩展配置中有一些错误时,不允许我安装它
# /usr/local/pear/bin/pecl install gearman
downloading gearman-1.1.0.tgz ...
Starting to download gearman-1.1.0.tgz (30,488 bytes)
.........done: 30,488 bytes
3 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
building in /tmp/pear/install/pear-build-rootrDO8Ob/gearman-1.1.0
running: /tmp/pear/install/gearman/configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20090626
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable gearman support... yes, shared
not found
configure: error: Please install libgearman
ERROR: `/tmp/pear/install/gearman/configure' failed
config.m4 中有几行有趣的内容
for i in $PHP_GEARMAN /usr/local /usr /opt/local; do
if test -r $i/include/libgearman-1.0/gearman.h; then
GEARMAN_LIB_DIR=/usr/lib
GEARMAN_INC_DIR=/usr/include/
AC_MSG_RESULT([found in $i])
break
fi
done
首先是对“libgearman-1.0”的引用(源代码中使用了相同的目录名称)。安装的包含改为/usr/include/libgearman。问题不大,我创建了一个链接
ln -s libgearman/ libgearman-1.0
同时以防万一,eddied GEARMAN_LIB_DIR 和 GEARMAN_INC_DIR 将其指向正确的目录。不幸的是,据我所知:
./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20090626
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable gearman support... yes, shared
found in /usr
checking for gearman_client_set_context in -lgearman... yes
checking for gearman_worker_set_server_option in -lgearman... no
configure: error: libgearman version 0.21 or later required
您知道在 Debian/Ubuntu 上安装此 PHP 扩展的最简单方法是什么吗?我在谷歌上找到了一些建议,但没有一个对我有用。
最佳答案
这不起作用的原因是,如错误消息所述,最新版本的 PHP 扩展需要 libgearman-1.0(这就是目录命名为 1.0 的原因)。您至少需要使用 wheezy(这是 debian 6/squeeze 之后的版本)才能获得 libgearman-1.0。
也可能是从源代码编译 libgearman 的解决方案,然后使用 checkinstall
创建一个您之后安装的 debian 包,或者使用 https:/提供的 gearman developer ppa/launchpad.net/~gearman-developers/+archive/ppa
。我们在各种发行版(包括 Debian、Ubuntu、RHEL4 和 SL6)上构建了 libgearman、gearmand 和 PHP 扩展,并使用 checkinstall 来获得合适的可用包。
关于php - 在 Debian 6 上安装 Gearman PHP 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13312207/
有人可以指导我在出现异常时 Gearman 如何重试 抛出或发生错误时? 我在 Django 应用程序中使用 python gearman 客户端,我的工作人员是 作为 Django 命令启动。我从这
是否可以从本地系统调用远程 gearman 工作人员?我尝试使用我的远程 Azure 服务器 IP 进行调用: 本地系统上的客户端: gm_client = gearman.GearmanClient
有没有办法从 Gearman 作业服务器中删除所有 Gearman 作业?我有一个在后台运行 Gearman 作业的 PHP 应用程序。对于我的单元测试,我需要确保 a) 没有工作在等待执行它的工作人
本文实例讲述了gearman+mysql方式实现持久化操作。分享给大家供大家参考,具体如下: 1、为什么要持久化? gearman的job server中的工作队列存储在内存中,一旦服务器有未处
我只是设法在我本地的 Ubuntu 测试环境中安装了 gearman。我想知道我是否可以在开发阶段以任何方式在同一台计算机上同时运行 worker 和客户端? 最佳答案 我自己没试过;但是由于 Gea
首先,我知道 this题: Gearman: Sending data from a background worker to the client 我想知道的是,Gearman 还是这样吗?我计划将
我目前正在测试Gearman,以处理来自Web前端的并行任务/请求,Gearman cleint通过Ajax接收带有post params的请求,然后创建任务并将其发送给Gearman Worker。
我无法找到有关带有“--status”选项的 gearadmin 命令行工具含义的任何文档。工作函数名称后面的三个数字的含义是什么? 例如,然后我运行以下命令: gearadmin --status
我目前正在开发一个使用 Gearman 进行异步数据处理的系统。 我可以连接到 Gearman 服务器来检查当前的工作人员数量和各种队列的大小,这对于确定处理是否正在备份等非常有用,但我还想要一些有关
我有一些在 php 上实现的 Gearman 工作人员。这些工作人员的每个任务都应该在自己的事务中执行。为了让这些工作人员访问我的 MySQL 数据库,我需要像连接池这样的东西。您能否为此提出一些建议
我正在尝试将 gearman 用于后台任务并从 worker 获取数据进度。在文档中我看到了方法:send_job_data 和 send_job_status,但是后台优先方法不起作用(我没有在 j
我有一个简单的 python 脚本来发送 gearman 任务: 客户: # "source" is a simple tuple client = GearmanCl
我正在尝试使用 Python gearman 模块进行字符串反转的各种基本示例我的本地主机已在端口 4730 上使用 IIS 设置但是我收到错误 raise UnknownCommandError(m
我在我的项目中使用 Gearman Job 服务器。我使用 'gearman-ruby' gem 。应用程序中有一个任务队列。一项任务有 4 个部分。 适本地,我有 4 个 worker 来解决这部分
我试图理解 Gearman,但直到现在我还无法弄清楚任务和工作之间的区别。 我正在尝试创建一个客户端,它将定期(每 10 分钟)解析一个 XML 页面。哪种方法最好? 最佳答案 手册offers a
我有一个 Gearman 服务器运行一个需要几分钟才能完成的进程。我正在运行一个进度条来显示完成情况,并尝试使用 Gearman PHP 扩展和 jobStatus() 函数获取进度条的百分比。 由于
描述 正在尝试安装 laelaps/symfony-gearman-bundle通过 composer require laelaps/symfony-gearman-bundle 有一些错误,我很难
我有一个简单的 Gearman 客户端和工作器。我在我的 Ubuntu 桌面上同时运行。我已经安装了 gearman-beta pecl 软件包和来自 synaptic 的 Gearman 版本。 我
研究 PHP/Gearman。我试图了解 Gearman 服务器/进程如何确定什么构成“有效”客户端。 在我看过的文档中,文档显示了许多连接到 Gearman 服务器的客户端。但是,我没有找到任何描述
我是 Gearman 的新手。我对优化的 Gearman 用法有以下疑问: 1) 我认为 worker 期望工作是一个“字符串”。我可以将数组或哈希作为作业发送给工作人员吗?如果不是,JSON 是发送
我是一名优秀的程序员,十分优秀!