6

我正在尝试使用与 RabbitMQ 和 Django 一起运行的 Celery。到目前为止,我的服务器上安装了 RabbitMQ 2.7,以及 python 2.7、Django 1.3、celery 2.4.6 和 django-celery 2.4.2

我按照这里的简单说明http://django-celery.readthedocs.org/en/latest/introduction.html

然后我尝试通过运行来启动芹菜

$ python manage.py celeryd

但它给了我这个错误

Unrecoverable error: ImportError('This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.

我做了一些研究,发现了这里的错误http://bugs.python.org/issue3770,它应该是固定的,但我猜不是python 2.7。

另外,我的操作系统是 CentOS release 4.9 (Final)。我从源代码构建了python。

我启动了 python shell 并运行:

import multiprocessing

没有错误,但是我然后运行:

from multiprocessing import synchronize

我得到了错误(上面)。

任何帮助表示赞赏。

4

1 回答 1

11

我在 OpenVZ 下运行的 CentOS 6 上遇到了同样的问题。我不得不安装/dev/shm,因为它不见了。将以下内容添加到/etc/fstab

tmpfs   /dev/shm    tmpfs   defaults        0   0

然后运行sudo mount /dev/shm,看看它是否有效。我有自己定制的 Python 2.7.3,并且在构建时也需要存在此设备,否则 Python 将无法在sem_open支持下构建。运行时检查以下输出./configure

checking for sem_open... yes
于 2012-05-31T09:12:15.230 回答