PATH question

How does one decide where to un-zip a tar file ? I've downloaded one and placed it in my own directory but it has created USR and various sub libraries such as BIN.

In trying to run the executable, I'm getting

hercules: error while loading shared libraries: libherc.so: cannot open shared object file: No such file or directory

This module is indeed in a library within the structure that I created.

Does the direcories that were created have all the permission for you to able to read/write a file?

This is the file that the executable is complaining about

-rwxr-xr-x 1 stan users 111229 2009-05-12 09:22 libhercu.so

PWD shows this

/home/stan/usr/local/herc64/hercules-SVN-5345/bin

The library that libhercu.so is in is LIB under hercules-SVN-5345 - is that my problem here ?

Quick Solution:

In the terminal, type:

cd ~
mkdir -p .local
cd .local
cp -rf ~/usr/local/* ./
echo 'export PATH="$PATH":"$HOME/.local/bin"' >> ~/.bashrc
echo 'setenv PATH "$PATH":"$HOME/.local/bin"' >> ~/.cshrc
echo 'export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$HOME/.local/lib"' >> ~/.bashrc
echo 'setenv LD_LIBRARY_PATH "$LD_LIBRARY_PATH":"$HOME/.local/lib"'  >> ~/.cshrc

Then close and reopen the terminal, and then type:

hercules

More Complex Answer:

The ".so" file is a dynamic library (a.k.a. "shared object", hence the ".so" extension). Whereas the PATH environment variable is used for finding executable files, the LD_LIBRARY_PATH environment variable is used by the dynamic loader for finding dynamic libraries. These days, almost all executables depend on one or more dynamic libraries for some of their functionality.

Entered each of the lines - closed the terminal, reopened it - and -

stan@linux-3kun:~> hercules
bash: hercules: command not found
stan@linux-3kun:~>

Would you mind posting the results of executing the following commands?

echo "$PATH"
echo "$LD_LIBRARY_PATH"
ls "~/.local/bin"
ls "~/.local/lib"

I must defer on a response till I download the correct and complete Hercules package tonite. I located a .rpm version and all may be well as it did appear that some items were missing.

Afterwards all may be well this time. I will test, and followup with a response.

Thank you very much for your assistance.