我知道我在这个问题上的问题是什么,但我对如何最好地解决它有点困惑。
我有一个 RHEL 5.4 系统,安装了 Python2.6 alt(通过 geekymedia RPMS)。一切似乎都在工作。当我调整一个规范文件时,我能够构建 RPM 来使用这个新的 Python 安装。我正在同一个 64 位系统上构建我的所有 RPM。
[jduncan@mgi-ric-squid1 x86_64]$ rpm -qa python
python-2.4.3-27.el5
[jduncan@mgi-ric-squid1 x86_64]$ rpm -qa python26
python26-2.6-geekymedia1
[jduncan@mgi-ric-squid1 x86_64]$ rpm -qa enchant
enchant-1.4.2-4.el5.1
enchant-1.4.2-4.el5.1
[jduncan@mgi-ric-squid1 x86_64]$ rpm -qa python-enchant
python-enchant-1.5.1-7.2
附魔 RPM 是 RHEL 存储库中的默认设置。
当我尝试导入附魔模块时,我收到以下警告,并且我无法创建字典对象:
[jduncan@mgi-ric-squid1 x86_64]$ python26
Python 2.6 (r26:66714, Feb 24 2010, 15:24:02)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import enchant
libenchant.so.1
** (process:10075): WARNING **: Error loading plugin: /usr/lib/enchant/libenchant_myspell.so: wrong ELF class: ELFCLASS32
>>> d = enchant.Dict("en_US")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/enchant/__init__.py", line 470, in __init__
self._switch_this(broker._request_dict_data(tag),broker)
File "/usr/lib/python2.6/site-packages/enchant/__init__.py", line 256, in _request_dict_data
self._raise_error(eStr % (tag,),DictNotFoundError)
File "/usr/lib/python2.6/site-packages/enchant/__init__.py", line 212, in _raise_error
raise eclass(default)
enchant.DictNotFoundError: Dictionary for language 'en_US' could not be found
附魔 1.5.1 的简单升级会起作用吗?还是需要做更多的工作?