Program is part of the Xenomai test suite, cross-compiled from Linux PC into Linux+Xenomai ARM toolchain.
# echo $LD_LIBRARY_PATH /lib # ls /lib ld-2.3.3.so libdl-2.3.3.so libpthread-0.10.so ld-linux.so.2 libdl.so.2 libpthread.so.0 libc-2.3.3.so libgcc_s.so libpthread_rt.so libc.so.6 libgcc_s.so.1 libstdc++.so.6 libcrypt-2.3.3.so libm-2.3.3.so libstdc++.so.6.0.9 libcrypt.so.1 libm.so.6 # ./clocktest ./clocktest: error while loading shared libraries: libpthread_rt.so.1: cannot open shared object file: No such file or directory
Edit: OK I didn't notice the .1 at the end was part of the filename. What does that mean anyway?
Fix ing 'cannot open shared object file: No such file or directory' error. One quick way to fix this “error while loading shared libraries” automatically is to use ldconfig. This one liner should solve the problem in most cases.
If you want to open a shared-library file, you would open it like any other binary file -- with a hex-editor (also called a binary-editor). There are several hex-editors in the standard repositories such as GHex (https://packages.ubuntu.com/xenial/ghex) or Bless (https://packages.ubuntu.com/xenial/bless).
so file is a binary file used as a native library on Android. Normally it's a part of an Android application. If you want to see its content, you need to open it as a binary file in a binary (hex) viewer. In any case you won't see much there, but hex code.
Your library is a dynamic library. You need to tell the operating system where it can locate it at runtime.
To do so, we will need to do those easy steps:
sudo find / -name the_name_of_the_file.so
LD_LIBRARY_PATH
)$ echo $LD_LIBRARY_PATH
if there is nothing to be displayed, add a default path value (or not if you wish to)
$ LD_LIBRARY_PATH=/usr/local/lib
Note that the path should be the directory where the path.so.something
is. So if path.so.something
is in /my_library/path.so.something
it should be :
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/my_library/ $ export LD_LIBRARY_PATH $ ./my_app
Reference to source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With