PATH question

 
Thread Tools Search this Thread
Operating Systems Linux SuSE PATH question
# 1  
Old 05-13-2009
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.
# 2  
Old 05-13-2009
Does the direcories that were created have all the permission for you to able to read/write a file?
# 3  
Old 05-14-2009
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 ?

Last edited by stansaraczewski; 05-14-2009 at 12:27 AM..
# 4  
Old 05-14-2009
Quick Solution:

In the terminal, type:
Code:
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:
Code:
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.
# 5  
Old 05-14-2009
Entered each of the lines - closed the terminal, reopened it - and -

stan@linux-3kun:~> hercules
bash: hercules: command not found
stan@linux-3kun:~>
# 6  
Old 05-14-2009
Would you mind posting the results of executing the following commands?

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

# 7  
Old 05-14-2009
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

Hello, I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies

2. UNIX for Advanced & Expert Users

Command to see the logical volume path, device mapper path and its corresponding dm device path

Currently I am using this laborious command lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}' Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Discussion started by: royalibrahim
2 Replies

3. Shell Programming and Scripting

Moving files from parent path to multiple child path using bash in efficient way

Hi All, Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created. /Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt /Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Discussion started by: karthikgv417
6 Replies

4. OS X (Apple)

Newbie PATH command question...

Still trying to pick up speed on the command line in OSX. I have installed Apache, and some other server software, but am having problems getting my install of Perl to work. I feel like it's because my Apache install is looking for the base (built-in) Perl that came with OSX which is 5.10. I... (4 Replies)
Discussion started by: Bridger
4 Replies

5. Shell Programming and Scripting

Question on tweaking the PATH variable to allow the world to run my executable script

All, I am pretty new to Unix and still in the learning curve :) I have a simple requirement for which I did not get an answer yet (Atleast I do not know how to keyword the search for my requirement!!!). I have an executable script my.script1 in a folder /data/misc/scripts/dev, which when... (5 Replies)
Discussion started by: bharath.gct
5 Replies

6. Shell Programming and Scripting

Executing Commands From Non-Standard Path (Changing user's PATH secretely???)

Hi: I have a requirement as below: I have some standard Unix commands modified and kept them in a directory say /usr/clsh/bin. For example I have a script named "ls" kept here which is modified version of "ls" (say it always gives long listing i.e. ls -l). When any user logs on and types... (2 Replies)
Discussion started by: ramesh_samane
2 Replies

7. AIX

stupid question: the path

I'm sorry for my stupid question, but when I log in with one account on my AIX machine, I see: psar3@caixpc24: /home/psar3 > > When I login with another login (pger1), I see: caixpc24 # how can i change that i see the same for pger1 as for psar3??? (it's easy to see with which... (4 Replies)
Discussion started by: Leilah
4 Replies

8. HP-UX

Question about the hareware path and device name

# ioscan -f | grep disk Class I H/W Path Driver S/W State H/W Type Description disk 3 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-N disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 146 GST3146707LC ... (1 Reply)
Discussion started by: bluepluto
1 Replies

9. UNIX for Dummies Questions & Answers

Question about Restricting Search path of FIND to current directory

Hi, By default FIND command searches for matching files in all the subdirectories within the specified path. Is there a way to restrict FIND command's search path to only the specified directory and NOT TO scan its subdirectories. Any help would be more than appreciated. Thanks and Regards (2 Replies)
Discussion started by: super_duper_guy
2 Replies

10. UNIX for Dummies Questions & Answers

Question regarding the PATH

"Never put the current directory (specified by . (period)) in the PATH value specified for the root user. Never allow the current directory to be specified in /etc/profile. The root user should have its own PATH specification in his private .profile file " Infos: Refer:... (1 Reply)
Discussion started by: owange_county
1 Replies
Login or Register to Ask a Question