Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
10186937 opened this issue Aug 10, 2016 · 2 comments

Comments

@10186937
Copy link

10186937 commented Aug 10, 2016

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
Copy link
Contributor

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
Copy link
Author

10186937 commented Aug 11, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants