Help Solving "error while loading shared libraries: libASICamera2.so"

any question related to our SDK and driver

Moderators: yang, ray, chad

Post Reply
jacob.m
Posts: 6
Joined: Mon Jun 18, 2018 8:01 pm

Help Solving "error while loading shared libraries: libASICamera2.so"

Post by jacob.m » Tue Nov 19, 2019 8:42 pm

Hi,

I'm trying to get the SDK up an running on my machine. I am running Fedora 29, and I have installed OpenCV2 with developer stuff and have also downloaded the ZWO ASI SDK. I am simply trying to run one of the demos. In the demo directory, I run Make, and then I see a main_SDK2_video_mac along with some warnings. However, when I try to run it, I see this:

Code: Select all

./main_SDK2_video_mac: error while loading shared libraries: libASICamera2.so: cannot open shared object file: No such file or directory
I note that the readme.txt says this: "If libASICamera2.so or (.dylib) can't be found at run time, resolve by delow two ways:
1.Add a .conf file that contains the path of the library to /etc/ld.so.conf.d/, run ldconfig.
2.Add compile option -Wl,-rpath=<library path>"

However, I don't know what this means. How do I implement either of those solutions?

Additionally, I see three .cpp files: main_SDK2_snap.cpp , main_SDK2_video.cpp, and main_SDK2_video_mac.cpp; I see the final one being made. Do I have to change something in the Makefile to make the other two programs? What does main_SDK2_video_mac do, compared to the other ones? I assume the _snap.cpp is a program that takes one frame and _video.cpp is one that take a video.

Thanks

User avatar
chad
Posts: 636
Joined: Thu Feb 09, 2017 4:58 am

Re: Help Solving "error while loading shared libraries: libASICamera2.so"

Post by chad » Wed Nov 20, 2019 1:58 am

Hi Jacob,
Have you had any experience in code development? If you do not, I will only tell you how to fix it. If you do, I will tell you why it happens, and you can solve it in your ways.
Thanks
Chad
ZWO Driver Engineer
Location:lon=120.6 lat=31.3
SuZhou China

jacob.m
Posts: 6
Joined: Mon Jun 18, 2018 8:01 pm

Re: Help Solving "error while loading shared libraries: libASICamera2.so"

Post by jacob.m » Wed Nov 20, 2019 1:29 pm

Hi Chad,

Thanks for your response. To answer your question, I have limited experience with development. I can do some programming in C, and have some experience with Linux and programming on Linux, but I'm still learning. That being said, because I'm still learning these things (some of which I know are pretty basic), an explanation of what's going on here would be welcome if you're willing to explain.

Thanks,
Jacob

User avatar
chad
Posts: 636
Joined: Thu Feb 09, 2017 4:58 am

Re: Help Solving "error while loading shared libraries: libASICamera2.so"

Post by chad » Thu Nov 21, 2019 3:34 am

Hi Jacob,
OK.
Our SDK is available in the form of a standard C++ library. Like libc.so or libstdc++.
Like the header file that you include in your code. There are 2 kinds: " #include <***> " and " #include "***" "
The first one means that the header file should be searched in the system header file directory.
The second one means the the header file is located at the customer-defined path.
So for this error, it means that you used this library, but you did not tell the compiler of the path.
So it also has 2 ways, first, put this library into the system library file directory, Or point out the path when compile.
they are the resolution that we offered.
Hope you can understand.
Thanks
Chad
ZWO Driver Engineer
Location:lon=120.6 lat=31.3
SuZhou China

Post Reply