开发者

how can i fix this invalid ELF header errror?

I installed zeromq on ubuntu 10.04 and the compilation went through without any errors.

However when i try to run the python test, it results in this error:

jerome@VM1:~/zeromq/pyzmq-2.0.7$ python setup.py test
running test
Traceback (most recent call last):
  File "setup.py", line 144, in <module>
    'Topic :: System :: Networking'
  File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "setup.py", line 59, in run
    tests = TestLoader().loadTestsFromNames(testfiles)
  File "/usr/lib/python2.6/unittest.py", line 613, in loadTestsFromNames
    suites = [self.loadTestsFr开发者_运维技巧omName(name, module) for name in names]
  File "/usr/lib/python2.6/unittest.py", line 576, in loadTestsFromName
    module = __import__('.'.join(parts_copy))
  File "/home/jerome/zeromq/pyzmq-2.0.7/zmq/__init__.py", line 26, in <module>
    from zmq import _zmq
ImportError: /home/jerome/zeromq/pyzmq-2.0.7/zmq/_zmq.so: invalid ELF header

What do i need to do to fix this?


Try setting up pyzmq like this:

python setup.py configure --zmq=<your_zmqlibrary_installation_path>
python setup.py build_ext --rpath=<your_zmqlibrary_installation_path>/lib --inplace
python setup.py install
python setup.py test


According to how can i fix this invalid ELF header errror? you need to compile zeromq on your target instead of using a MAC OS X version ...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜