Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by LolaPet
at 2024-04-03 11:45:09
Point:500 Replies:4 POST_ID:828905USER_ID:10
Topic:
Linux;;
I am new to Linux environment. I coped oracle client library under /home/test/instantclient. Now I am wondering how can set up the environment variable in Linux.
Thanks for your help
Thanks for your help
Expert: woolmilkporc replied at 2024-04-04 08:22:30
@dvz - how can you know that there is a "lib" subdirectory? The asker didn't mention it.
My example works regardless of whether LD_LIBRARY_PATH was already definded or not.
Finally, don't use spaces around "=" when assigning variables.
My example works regardless of whether LD_LIBRARY_PATH was already definded or not.
Finally, don't use spaces around "=" when assigning variables.
Expert: dvz replied at 2024-04-04 05:18:17
@woolmilkproc in (39976184), right idea, but your example seems off -- you expand the variable as if it were previously defined; and omit the library subdirectory. To clarify:
...
export myhome = '/home/test/instantclient'
export LD_LIBRARY_PATH = $myhome/lib
Or if the variable was in use, the path could be extended to:
export LD_LIBRARY_PATH = /home/test/instantclient/lib:$LD_LIBRARY_PATH
@lolapet, a reminder to check your syntax with:
> env|sort
and look for the variable values
...
export myhome = '/home/test/instantclient'
export LD_LIBRARY_PATH = $myhome/lib
Or if the variable was in use, the path could be extended to:
export LD_LIBRARY_PATH = /home/test/instantclient/lib:$LD_LIBRARY_PATH
@lolapet, a reminder to check your syntax with:
> env|sort
and look for the variable values
Accepted Solution
Expert: duncanb7 replied at 2024-04-03 12:12:23
500 points EXCELLENT
Did you try one of these as follow ?
1-
modify the file .bash_profile :
add the below lines to .bash_profile:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/test/instantclient
and then in terminal type:
#source ~/.bash_profile,
2- For TCSH: setenv LD_LIBRARY_PATH=/home/test/instantclient
3- For BASH: export LD_LIBRARY_PATH=/home/test/instantclient
4- With most modern distribution (works on Debian, Ubuntu and openSUSE), the loading of shared library is controlled in configuration files ( namely "/etc/ld.so.conf" and all conf files in "/etc/ld.so.conf.d")
Go in directory " /etc/ld.so.conf.d "
As root (for exemple " sudo nano ", or whatever) add a file named " cuda.conf "
Type in the path to the oracle library "/home/test/instantclient", and save the file
As root run " /sbin/ldconfig " to update
And what is your linux distribution you are using , Debain or Centos ?
Duncan
1-
modify the file .bash_profile :
add the below lines to .bash_profile:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/test/instantclient
and then in terminal type:
#source ~/.bash_profile,
2- For TCSH: setenv LD_LIBRARY_PATH=/home/test/instantclient
3- For BASH: export LD_LIBRARY_PATH=/home/test/instantclient
4- With most modern distribution (works on Debian, Ubuntu and openSUSE), the loading of shared library is controlled in configuration files ( namely "/etc/ld.so.conf" and all conf files in "/etc/ld.so.conf.d")
Go in directory " /etc/ld.so.conf.d "
As root (for exemple " sudo nano ", or whatever) add a file named " cuda.conf "
Type in the path to the oracle library "/home/test/instantclient", and save the file
As root run " /sbin/ldconfig " to update
And what is your linux distribution you are using , Debain or Centos ?
Duncan
Expert: woolmilkporc replied at 2024-04-03 12:11:36
To set it for a specific user add this line:
export LD_LIBRARY_PATH=/home/test/instantclient:$LD_LIBRARY_PATH
to the end of the file ".bashrc" in the home directory of the concerned user (Note the leading dot ".").
To get a system wide setting add the above to the end of /etc/bashrc (Note: "bashrc" without the leading dot).
export LD_LIBRARY_PATH=/home/test/instantclient:$LD_LIBRARY_PATH
to the end of the file ".bashrc" in the home directory of the concerned user (Note the leading dot ".").
To get a system wide setting add the above to the end of /etc/bashrc (Note: "bashrc" without the leading dot).