I'm going to be doing some programming using Java 2 for sure and maybe SDL. I'm using Linux (Red Hat 8.0, but I'm not married to the distro at all). One thing I've been having consistent trouble with in running test applications (other people's Java and SDL based games ) is shared object files either missing or having trouble finding them.
Missing problem: For one SDL application, I get./nil: error while loading shared libraries: libSDL-1.0.so.0: cannot open shared object file: No such file or directory.
Indeed, this file is not resident on my computer. However, if I attempt to use the proper rpm, I get an error message telling me that a more current rpm is already installed.
Rpms are sometimes ****y about these dependencies, and I really don't want to have to remove a package to temporarily install a deprecated package. Switching back and forth is not a solution, but would compiling the older lib from source be viable or could I create a symbolic link named libSDL-1.0.so.0 pointing to a correct library? (Couldn't find appropriate material on libSDL.org)
Finding problem: In the second case, the library/shared object IS in the correct place, but the game can't find it. I'm searching through my Linux texts and help docs and haven't found anything that tells me how to properly troubleshoot this.
Thanks in advance if anyone is able to help.
Shared Library Paths: Linux
Re:Shared Library Paths: Linux
I discovered a solution. First, I had to make sure the file was actually in the directory in ld.so.conf
Next, I created a LD_LIBRARY_PATH variable in .bash_profile and set it to /usr/local/lib ... but I'm not sure if I actually need to do this.
Next, I ran ldconfig, and then I was able to use the shared library objects that were "missing"
Next, I created a LD_LIBRARY_PATH variable in .bash_profile and set it to /usr/local/lib ... but I'm not sure if I actually need to do this.
Next, I ran ldconfig, and then I was able to use the shared library objects that were "missing"