how to link a library to an executive file - linux

I have a question about an executive file.
I got an executive files from another linux server,but the environment wasn't the same.
It's lack of libjemalloc.so.1. What could I do to let the executive file link to libjemalloc.so.1.
BTW,if I execute the file ,the error message is "error while loading shared libraries: libjemalloc.so.1: cannot open shared object file: No such file or director."
Thanks.

You need to export LD_LIBRARY_PATH variable pointing to the directory where you have kept the libjemalloc.so.1. shared library file and then run the executable binary it will get the reference.
export LD_LIBRARY_PATH="PATH TO SHARED LIBRARY"

Related

How to fix service error Oracle jws webserver

After RHEL6-7 migration setting up oracle jws web servers says "error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory "
/apps/oracle/jws-webserver-3.0.3/jws_proxy/httpd/sbin/httpd: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
Well, it looks like your migration messed up a couple of things.
Check if you actually have or not the library.
find / -name libpcre.so.1
If you do, then check your LD_LIBRARY_PATH, if not, then add the path to it so the binary can get it.
Another option is, pcre is not even installed, then process to get it and install it.

ctags: error while loading shared libraries: libgpm.so.1: cannot open shared object file: No such file or directory

I have used ctags command to generate tags to traverse in vi editor. Unfortunately
a shared library is not available. how to fix this problem, i don't want to install the library as i'm working on a shared development environment.
Please check the below error.
ctags: error while loading shared libraries: libgpm.so.1: cannot open shared object file: No such file or directory.
Use export LD_LIBRARY_PATH=/path/where/libgpm.so/is/located
And then start it again.

Error while loading shared library : librun.so

I have a compiled script (it's some utility) and the source code of which is unavailable. As soon as I run the script this error shows up:
error while loading shared libraries: librun.so: cannot open shared object file: No such file or directory
I have faced these kind of errors in past which had different solutions. I tried all as per my knowledge and..
librun.so is there in lib folder of my application
It is symbolic link and pointing to correct version
librun.so is available in path variable
changed .profile to look for the required library
changed permissions and checked
"which librun.so" is also returning the presence of that library
still this error shows up.
What can be the reason for this problem?
The dynamic linker is unable to find librun.so during runtime linking of shared libraries. Try adding the path of directory containing librun.so to the LD_LIBRARY_PATH environment variable when starting the application script.

could not load a library

I am using a tool that repeatedly returns an error saying that it cannot load a library file (libppl.so.12: cannot open shared object file: No such file or directory) at <path_to_file>. The thing is that the required file is actually there.
I've tried setting the LD_LIBRARY_PATH, adding entries to ld.so.conf and ld.so.conf.d and then running ldconfig, which are solutions I found on the links provided bellow. The problem, however, is still there. When running ldconfig -v, I can see that it looks at the file directory but does not populate the cache for any of the so files in the directory, including the one at <path_to_file>.
What could be the problem?
useful links:
cannot open shared object file: No such file or directory
Linux error while loading shared libraries: cannot open shared object file: No such file or directory
The tool may be 32 bits and you've the 64 bits version of the library.
You can check the binary architecture via the file command.
Also, you can force the library via LD_PRELOAD

cannot open shared library file while running program in arm machine

I have build a program in linux(ubuntu 12.04) using arm-linux-gnueabi-g++.
The program compiles fine. When I transferred the program to an arm machine and tried to run I got this error:
error while loading shared libraries: libPVROCL.so: cannot open shared object file: No such file or directory.
I copied the library to the /usr/local/lib folder of the arm machine but it did not work. I cannot change the conf file or environvent variables of the arm machine. The arm system is stripped down to the extent that it doesn't have ldconfig or ldd or much else. ldd run on another more capable system against the executable shows this line:
not a dynamic executable
Can anyone give me a solution or show me a path? Any help will e appreciated.
I tried to build the code statically and I specified all the libraries with their full path. But I could not build as it gives me another error:
attempted static link of dynamic object `/OpenCV/opencv/install/lib/libopencv_core.so'

Resources