Results 1 to 10 of 15
Hi all
My first post here
Actually have the same post in fedora/red hat but nobody is responding so im guessing wrong place
I am trying to run the cache ...
- 09-18-2008 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 10
LD_LIBRARY_PATH blank problem
Hi all
My first post here
Actually have the same post in fedora/red hat but nobody is responding so im guessing wrong place
I am trying to run the cache database and oracle client on Red hat 5
Cache needs to use unixODBC to retrieve data from an external oracle db via the oracle client.
This requires me to have the LD_LIBRARY_PATH and JAVA_HOME set for the root user, which i have in root's .bash_profile
however when my cache service starts or i log into the GUI and open a terminal and i do an echo $LD_LIBRARY_PATH it comes up blank.
if i then do a su - root and then do a $LD_LIBRARY_PATH it comes back with the correct info
This now has me manually restarting the cache db every time the server restarts.
e.g.
[root@SK-DB-CA-P ~]# echo $LD_LIBRARY_PATH
[root@SK-DB-CA-P ~]# su - root
[root@SK-DB-CA-P ~]# echo $LD_LIBRARY_PATH
/cachedata/bin:/orabin/oracle/10.2_client/lib:/lib:/usr/lib:/cachedata/bin
[root@SK-DB-CA-P ~]#
I have added the $LD_LIBRARY_PATH to /etc/profile but to no effect
could anybody please help me or tell me what i must set where?
Thank you
- 09-30-2008 #2Just Joined!
- Join Date
- Sep 2008
- Posts
- 2
I think you should add following lines to /etc/profile file (to the end of file):
if ! echo ${LD_LIBRARY_PATH} | /bin/fgrep -q "/opt/intel/fc/10.1.018/lib"
then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH":/opt/intel/fc/10.1.018/lib"
fi
just you should change the library path
I hope it correctly works!!!
- 10-07-2008 #3Just Joined!
- Join Date
- Sep 2008
- Posts
- 10
Hi
Sorry i have no /opt/intel/fc/10.1.018/lib folder
I have no folders in /opt/
This red hat is running in VM ware, if that helps/makes a diffrence
- 10-07-2008 #4Have you exported the variable ,if not add following line to /etc/profileI have added the $LD_LIBRARY_PATH to /etc/profile but to no effect
export $LD_LIBRARY_PATH
adding to /etc/profile and export it should work properly.
In case you adding to .bash_profile then after editing .bash_profile file, try
source /root/.bash_profile
Also note each user have their own .bash_profile.- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 10-07-2008 #5Just Joined!
- Join Date
- Sep 2008
- Posts
- 2
as I told you before, you should put your library path instead of mine!!! so you should erase "opt/intel/fc/10.1.018/lib" path then, you should write your correct library path that what you want to add...
another option is following:
1. open a terminal
2. write export LD_LIBRARY_PATH=/write/your/lib/folder/path:$LD_LIBRARY_PATH
if you close that opened terminal and if you open new terminal, you leave the LD_LIBRARY_PATH. this option works just one terminal!!!
yes WMware is a virtual PC but not important. for many years I worked on virtual PC. I compiled many programs and library on it for testing. you can think it as a real computer. everything is same with a physical PC. If a program dose not work WMware, most probabaly it will not work in physical PC either.
these are my experience. either it can work or it can't. just try!!!
- 10-07-2008 #6Just Joined!
- Join Date
- Sep 2008
- Posts
- 10
Hi, my .bash_profile:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
ORACLE_BASE=/orabin/oracle; export ORACLE_BASE
ORACLE_SID=; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_HOME=/orabin/oracle/10.2_client; export ORACLE_HOME
JAVA_HOME=/usr/local/java/jdk1.6.0_04/jre; export JAVA_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
PATH=$PATH:/usr/sbin:$HOME/bin:$ORACLE_HOME/bin:$LD_LIBRARY_PATH; export PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
export $LD_LIBRARY_PATH
unset USERNAME
as soon as i add the export $LD_LIBRARY_PATH and do source /root/.bash_profile i get:
[root@localhost ~]# source /root/.bash_profile
-bash: export: `/orabin/oracle/10.2_client/lib': not a valid identifier
- 10-08-2008 #7
Sorry,my mistake it's (Remove $ from variable name)
export LD_LIBRARY_PATH
Now try
if want to use /etc/profile ,then make sure these entriesCode:source /root/.bash_profile
available in that file.# User specific environment and startup programs
ORACLE_BASE=/orabin/oracle; export ORACLE_BASE
ORACLE_SID=; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_HOME=/orabin/oracle/10.2_client; export ORACLE_HOME
JAVA_HOME=/usr/local/java/jdk1.6.0_04/jre; export JAVA_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
PATH=$PATH:/usr/sbin:$HOME/bin:$ORACLE_HOME/bin:$LD_LIBRARY_PATH; export PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
export $LD_LIBRARY_PATH
And try
orsource /etc/profile
simply restart the machine
and check for the variable- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 10-08-2008 #8Just Joined!
- Join Date
- Sep 2008
- Posts
- 10
Ok i have done everything but no luck.
Let me ask, as which user do startup scripts get run?
Becuase if i "look" at these settings from within cache databse after the system has booted:
PATH
/sbin:/usr/sbin:/bin:/usr/bin
LD_LIBRARY_PATH
/cachedata/bin
ODBC does not work
and after i log in as root an restart the cache database:
PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/sbin:/root/bin:/orabin/oracle/10.2_client/bin:/orabin/oracle/10.2_client/lib:/usr/sbin:/root/bin:/orabin/oracle/10.2_client/bin:/orabin/oracle/10.2_client/lib
LD_LIBRARY_PATH
/cachedata/bin
ODBC works
and after i su - root and then restart cache
PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/sbin:/root/bin:/orabin/oracle/10.2_client/bin:/orabin/oracle/10.2_client/lib:/usr/sbin:/root/bin:/orabin/oracle/10.2_client/bin:/orabin/oracle/10.2_client/lib
LD_LIBRARY_PATH
/cachedata/bin:/orabin/oracle/10.2_client/lib
ODBC works
This is confusing
- 10-09-2008 #9
Here is some information that may help you.
Each user have their ownfile.bash_profile
For example ,my system has 3 accounts/users
root,lg,oss
Then
/root/.bash_profile will have setting related to root.
/home/lg/.bash_profile --all the variable defined here is limited to lg.
/home/oss/.bash_profile --all the variable defined here is limited to oss.
If I add new variable for root in /root/.bash_profile,Then
these values can't be accessed when you login as lg or oss.
Similarly when you add new value to lg ,
It can't be accessable when you login as root or oss.
So .bash_profile is specific the each account or user.
If you want to set variable that should be accessed all users (root,lg,oss) then added them in /etc/profile.
Hope this Helps.- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 10-09-2008 #10Just Joined!
- Join Date
- Sep 2008
- Posts
- 10
So when red hat is booting, as which user do the services start, since i am starting cache as a service
Or can i set the user starting the service?


Reply With Quote

