开发者

pyenchant RPM for alt-install of python2.6. ELF class error

I know what my problem is with this issue, but I'm a little confused about how to best go about fixing it.

I have a RHEL 5.4 system, with Python2.6 alt-installed (via the geekymedia RPMS). everything seems to be working. As I tweak a spec file, I'm able to build out RPMs to work with this new Python install. I'm building all of my RPMs on the same 64-bit system.

[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

the enchant RPMs are default from the RHEL repositories.

When I try开发者_如何转开发 to import the enchant module I get the following warning, and I can't create a dictionary object:

[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

Would a simple upgrade to enchant 1.5.1 work? Or is more work than that required?


Just in case someone else runs into this:

  1. I removed the RHEL versions of enchant
  2. downloaded the RHEL source RPM for enchant (same version)
  3. built my own 64-bit only RPM for enchant
  4. installed that

my Py2.6 altinstall python-enchant package now works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜