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?
I had the similar error, I could resolve it by giving,
Hope this helps.
The linux.org reference page explains the mechanics, but doesn't explain any of the motivation behind it :-(
For that, see Sun Linker and Libraries Guide
In addition, note that "external versioning" is largely obsolete on Linux, because symbol versioning (a GNU extension) allows you to have multiple incompatible versions of the same function to be present in a single library. This extension allowed glibc to have the same external version:
libc.so.6
for the last 10 years.Another possible solution depending on your situation.
If you know that libpthread_rt.so.1 is the same as libpthread_rt.so then you can create a symlink by:
Then
ls -l /lib
should now show the symlink and what it points to.I had a similar error and it didn't fix with giving LD_LIBRARY_PATH in ~/.bashrc . What solved my issue is by adding .conf file and loading it. Go to terminal an be in su.
Add your library path in this file and save.(eg: /usr/local/lib). You must run the following command to activate path:
Verify Your New Library Path:
If this shows your library files, then you are good to go.
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:
(1 ) Find where the library is placed if you don't know it.
(2) Check for the existence of the dynamic library path environment variable(
LD_LIBRARY_PATH
)if there is nothing to be displayed, add a default path value (or not if you wish to)
(3) We add the desire path, export it and try the application.
Note that the path should be the directory where the
path.so.something
is. So ifpath.so.something
is in/my_library/path.so.something
it should be :source : http://www.gnu.org/software/gsl/manual/html_node/Shared-Libraries.html
add these lines at the end