What does this error mean: invalid ELF header

匿名 (未验证) 提交于 2019-12-03 01:29:01

问题:

I'm getting an IMPORT ERROR with the following error message in Django debug mode /usr/local/lib/python2.6/dist-packages/lxml-2.3-py2.6-win32.egg/lxml/objectify.pyd: invalid ELF header

What does this mean and how do I fix it? Google is revealing not very much at the moment. This error is coming from this package I am using in my Django app

Update I'm using ubuntu and Python2.6

回答1:

The error means the objectify.pyd is not a valid shared library. You seem to have lxml compiled for different version of python from what you are running.

Guessing from the path, the fact that 'ELF' is an object (shared and executable) format used on unices and the package has -win32 in it's name you are probably trying to use windows build on linux.



回答2:

simply do a sudo pip install -U lxml

I had the same error, and it found an update to the existing installation and fixed it for me.

Alternatively, you may also use easy_install At times easy_install works better than pip, as sometimes pip may refuse to replace the existing library version as it's being used by the OS.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!