blockmon icon indicating copy to clipboard operation
blockmon copied to clipboard

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

Open 10186937 opened this issue 9 years ago • 2 comments

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!

10186937 avatar Aug 10 '16 07:08 10186937

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 .

jmmlmendes avatar Aug 10 '16 09:08 jmmlmendes

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.

10186937 avatar Aug 11 '16 02:08 10186937