sysml / blockmon

A Modular System for Flexible, High-Performance Traffic http://www.ict-mplane.eu/
http://fp7-demons.eu/
Other
24 stars 19 forks source link

ImportError: ../libblockmonpy.so: cannot open shared object file: No such file or directory #4

Open 10186937 opened 8 years ago

10186937 commented 8 years ago

Hi, When I tried running blockmon withpython daemon/cli.py command, I get the next error:

[root@localhost blockmon]# sudo python daemon/cli.py 
Traceback (most recent call last):
  File "daemon/cli.py", line 39, in <module>
    from core.bmprocess import BMProcessManager
  File "/home/qlq/blockmon/daemon/core/bmprocess.py", line 49, in <module>
    blockmon = imp.load_dynamic('blockmon','../libblockmonpy.so')
ImportError: ..**/libblockmonpy.so: cannot open shared object file: No such file or directory

I'm new to blockmon and I cannot make it on my own. So maybe I can get some assistance from you. I'm looking forward to that. Thanks!

jmmlmendes commented 8 years ago

It means that you haven't build blockmon yet (and thus creating libblockmonpy.so). Also, if you want to build with daemon support, don't forget to do cmake -DWITH_DAEMON=ON . instead of just cmake .

10186937 commented 8 years ago

Thank you. After the build was success, I found thelibblockmonpy.so in base dir and I run the command, python cli.py in daemon dir. It still reported an error:

[root@localhost blockmon]# python daemon/cli.py 
Traceback (most recent call last):
  File "daemon/cli.py", line 39, in <module>
    from core.bmprocess import BMProcessManager
  File "/home/qlq/blockmon/daemon/core/bmprocess.py", line 49, in <module>
    blockmon = imp.load_dynamic('blockmon','../libblockmonpy.so')
ImportError: ../libblockmonpy.so: cannot open shared object file: No such file or directory

And I changed the code, blockmon = imp.load_dynamic('blockmon','../../libblockmonpy.so'), no dice. So, I just use the absolute path, and it works.