LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 07-24-2005, 01:51 AM   #1
lwbeng
LQ Newbie
 
Registered: Jul 2005
Posts: 5

Rep: Reputation: 0
Problems installing and executing programme,


I have installled this software Viper into my redhat linux 7.3 machine and experience problems with setting the path and variables. I have installed this programme and started this successfully on another LINUX machine of a friend.

The files and folder of this programme is unzipped into the directory "/home/usrname/Viper". The file convert_conf_lin which is a binary file is also in this directory. The executable viperm_lin is also in this directory.

As I am using the bash shell, I edited the following in my .bash_profile:


Code:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs
VIPERHOME= /home/usrname/VIPER/DIRVIPER
CONVERT_CONF_VIPER= /home/usrname/VIPER/convert_conf_lin

#PATH=$PATH:$HOME/bin:/home/usrname/VIPER/DIRVIPER
PATH=$PATH:/home/usrname/bin:/home/usrname/VIPER/DIRVIPER
LD_LIBRARY_PATH=$VIPERHOME:$LD_LIBRARY_PATH

export PATH VIPERHOME CONVERT_CONF_VIPER LD_LIBRARY_PATH
unset USERNAME


My .bashrc file is as follows:

Code:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi


I am totally new to Linux and only came up with this file with extensive help from friends. I would like to check the following:

What does this

Code:
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
mean and if I remove this from my .bash_profile, will it affect my access to the programme ?

What does

Code:
unset USERNAME
mean?

When I type the command env or $ECHO env in the directory home/usrname/ , I noted the following which does not appear to be correct based on my understanding:
LD_LIBRARY_PATH= ::
There were also no mention of the other variables I have set VIPERHOME, CONVERT_CON_VIPER. I thought that they should be present since I have set and exported these variables?
Is there anything wrong with how I have set up my .bash_profile since I do not see any of the variables I have set and also since my LD_LIBRARY_PATH appears to be set up wrongly.

How can I check whether I have set up my .bash_profile correctly? Pls help point out any errors in this current file as I am currently unable to execute the programme at all.

Finally when I go to the home/usrname/VIPER directory, I tried to type the executable viperm yet was told there was no such file here although I could see the file when I tried listing. Instead a file vipalette which is present in home/usrname/VIPER/dirViper appears to be available. Can you help explain.


I have .cshrc files in this shell . Can I delete them since I am in bash shell and not csh shelll as I think what I have previously set here could be affecting my operations?

When I edit and save my .bash_profile file, do I need to reboot the pc for the new settings to take effect or can I just launch a new terminal or use the command . .bash_profile?

would appreciate any help I could get.Thanks a lot.
 
Old 07-24-2005, 02:00 AM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,506

Rep: Reputation: 116Reputation: 116
Well, LD_LIBRARY_PATH is set to be $VIPERHOME:$LD_LIBRARY_PATH. I'm not sure where it's losing the old path, but since VIPERHOME is set to a null value, I wouldn't expect anything from there.

Code:
f [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
This essentially says "if ~/.bashrc exists, then include it here". It should cause no problems, generally speaking.

Note that setting a variable is of the form NAME=VALUE. The bash interpreter is not like other programming languages that consider whitespace insignificant.
Code:
A=B
echo $A
A= B
echo $A
This would give:
Code:
B
bash: B: command not found
 
Old 07-24-2005, 10:59 AM   #3
lwbeng
LQ Newbie
 
Registered: Jul 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Would like to clarify further on the reply as I am really quite new to linux.

a. Well, LD_LIBRARY_PATH is set to be $VIPERHOME:$LD_LIBRARY_PATH. I'm not sure where it's losing the old path, but since VIPERHOME is set to a null value, I wouldn't expect anything from there.

What do you mean by losing the old path and VIPERHOME is set to a null value. I thought I have set and exported the following:
Code:
VIPERHOME= /home/usrname/VIPER/DIRVIPER
i.e. any reference to VIPERHOME should point to /home/usrname/VIPER/DIRVIPER.
Unless you mean I should have put:
Code:
VIPERHOME=/home/usrname/VIPER/DIRVIPER
i.e. the space bet the equal sign and /home/..... is removed.

If this is the case and also what you mean when you say:
Note that setting a variable is of the form NAME=VALUE. The bash interpreter is not like other programming languages that consider whitespace insignificant.
which means I should not allow any white space bet my equal sign and VALUE.

This means most probably my .bash_profile has errors due to the white space.

Would appreciate clarification. Thanks.
 
Old 07-24-2005, 12:01 PM   #4
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,506

Rep: Reputation: 116Reputation: 116
That's exactly what I meant. Sorry I wasn't clear enough. bash expects there to be no white space, or it basically considers it "unsetting" the value. Removing the space should help you make much progress.
 
Old 07-24-2005, 07:42 PM   #5
lwbeng
LQ Newbie
 
Registered: Jul 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for prompt response. Tried it out and when I type env, managed to get the following:
PATH=/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/home/valkyrie/bin:/home/valkyrie/bin:/home/valkyrie/VIPER/DIRVIPER=/usr/bin/env
CONVERT_CONF_VIPER=/home/valkyrie/VIPER/convert_conv_lin
VIPERHOME=/home/valkyrie/VIPER/DIRVIPER
LD_LIBRARY_PATH=/home/valkyrie/VIPER/DIRVIPER:/home/valkyrie/VIPER/DIRVIPER


However I still experience problem launching the executable viperm_lin which is in the folder /home/valkyrie/VIPER . Instead, theis comand is stated as not found when I did this. Instead anothem filed vipalette_lin which is in /home/valkyrie/VIPER/DIRVIPER can be found and executed.


Would appreciate if you could help provide more advice on what is wrong with my settings or installation.

Thanks.
 
Old 07-24-2005, 08:25 PM   #6
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,506

Rep: Reputation: 116Reputation: 116
You'd also need /home/valkyrie/VIPER in the PATH as well, not just /home/valkyrie/VIPER/DIRVIPER.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to tell a C++ programme to quit ? yogeshm02 Programming 3 09-09-2005 05:59 AM
allow ssh then kill the programme master Linux - Security 4 02-06-2005 02:17 AM
executing binary problems. cheater1034 Linux - Software 2 09-18-2004 11:08 AM
Printing the path for a currently executing programme tim_l Linux - Software 2 10-10-2003 06:17 AM
how can I modify this programme? wwnn1 Programming 5 05-14-2002 07:55 AM


All times are GMT -5. The time now is 12:07 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration