阿帕奇+ mod_wsgi + OS X 10.5.8 上的 aspell-python
我有一个网站,它以多种方式处理用户提交的文档,其中之一是对每个文档的一部分进行拼写检查。当我在 Mac Mini 上设置这个网站时(是的,我意识到这对于网站来说是一个相当薄弱的设备,但它是内部的,办公室外面没有人看到它),我记得在运行 aspell-python 时遇到了一些麻烦当从 Apache 调用时,安装 Aspell 很好,但愚蠢地忘记写下我是如何解决它的。我的印象是,这与 Apache、Python 和 Aspell 被编译为在不同的位模式下运行有关(Apache 为 64,Python 和 Aspell 可能为 32)。
无论如何,我使用的是现有的 Apache 和 Python 安装,并从源代码构建了 Aspell 并从 MacPorts 安装了它。它已经愉快地运行了大约一年,但是......
快进到今天:我运行了 OS X 的软件更新(现在我已经升级到 10.5.8),突然我的拼写检查器停止工作。目前,Django 抛出的消息是 aspell-python“找不到合适的图像”,特别是“通用包装器中没有匹配的架构”。
Aspell 和 aspell-python 在命令行中仍然可以正常工作,但不能通过网站。有人有什么想法吗?
编辑:现在使用 10.5.8,我的 psycopg2 绑定也停止工作。 aspell 和 psycopg2 都被用作共享对象,如果这有帮助的话。
I have a website that processes user submitted documents in a variety of ways, one of which is to do a spell check on a part of each document. When I set this website up on a Mac Mini (yes, I realize that's a pretty weak piece of equipment for a website, but it's internal and no one outside the office sees it), I remember having some trouble getting aspell-python to play nice with an install of Aspell when being invoked from Apache, but foolishly forgot to write down how I got around it. I'm under the impression that it had something to do with Apache, Python, and Aspell being compiled to run under different bit modes (64 for Apache, 32 for Python and Aspell, maybe).
In any case, I'm using the stock Apache and Python installs, and have built Aspell from source as well as installed it from MacPorts. It's been happily chugging along for about a year, but...
Fast forward to today: I ran OS X's software update (now I'm up to 10.5.8) and suddenly my spell checker stopped working. Currently, the message that's being thrown up by Django is that "no suitable image was found" by aspell-python, specifically that there is "no matching architecture in the universal wrapper".
Aspell and aspell-python continue to work fine from the command line, but not through the website. Does anyone have any thoughts?
Edit: Using 10.5.8 now, also, my psycopg2 bindings have stopped working. Both aspell and psycopg2 were being used as shared objects, if that's any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您仅从 10.5 的一个补丁修订版升级到 10.5 的更高补丁修订版,那么您应该不会看到 32 位与 64 位要求方面的行为有任何变化。如果它现在坏了,那么它之前应该已经坏了,因为它在 10.5 中始终表现相同,并且在补丁版本中没有改变。
情况可能并非如此的唯一原因是,如果您按照以下文档中的说明进行操作:
http ://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX
并精简您的 Apache 可执行文件,使其仅以 32 位运行,或者更新其 plist 文件以类似地以 32 位运行。
这是因为某些 10.5 补丁修订版替换了 Apache 可执行文件,还可能替换了 plist 文件,因此您的本地更改将被覆盖。
该文档确实指出,您可能必须在升级操作系统后重新应用这些更改。
If your upgrade was only from one patch revision of 10.5 to later patch revision of 10.5, then you shouldn't have seen any change in behaviour in respect of requirement for 32 bit vs 64 bit. If it broke now, it should have broke before as it has always behave same for 10.5 and didn't change in a patch revision.
The only reason this may not be the case, is if you followed instructions as documented in:
http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX
and thinned your Apache executable so only ran as 32 bit, or updated its plist file to similarly run as 32 bit.
This is because some of the 10.5 patch revisions replace the Apache executable and possibly the plist file and so your local change would have been overridden.
That documentation does note that you may have to reapply those changes after an upgrade of operating system.