LinuxQuestions.org
Visit Jeremy's Blog.
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
  Search this Thread
Old 07-24-2005, 02: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, 03:00 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
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, 11: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, 01:01 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
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, 08: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, 09:25 PM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration