LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-29-2005, 01:07 PM   #1
senthilpr_in
LQ Newbie
 
Registered: Aug 2005
Distribution: FC4 2.6.11-1.1369_FC4smp
Posts: 21

Rep: Reputation: 15
Cannot set LD_LIBRARY_PATH in .cshrc (able to set other env variables)


Hi all,

I' not able to set my LD_LIBRARY_PATH env variable in my .cshrc file. This is what I have tried .

----------------------------------------------------------------------------
...
...
setenv OIVHOME /home/oivhome
setenv LD_LIBRARY_PATH /home/oiv50/lib
setenv TESTVAR testvalue
...
...
----------------------------------------------------------------------------

The first line I have quoted was already present in my .cshrc file. LD_LIBRARY_PATH is not declared before, (atleast when I try echo $LD_LIBRARY_PATH in a shell, I get LD_LIBRARY_PATH: undefined variable).

I added the third line to see if I'm able to set any other variables, and after relogin I'm able to see that TESTVAR is set, but LD_LIBRARY_PATH is still not set.

My default shell is tcsh and I'm editing my .cshrc file. (Does that make a difference ) I tried changing my default shell to csh, still unable to set LD_LIBRARY_PATH.

Please advice
Senthil
 
Old 09-14-2005, 08:06 AM   #2
pats
Member
 
Registered: Jul 2005
Distribution: Debian Sarge/Etch, (K)Ubuntu, FC6, AIX5.3, VMWare ESXServer
Posts: 159

Rep: Reputation: 30
ok firstly when you've got a shell window open you can type

echo $0 to find out which shell your using

(personally i'd choose bash over anything because its just better)

it does matter which profile shell you edit because if you don't log into that particular shell then you won't initialise that env var. it is strange that the test var is being set but the library path isn't.

have you tried typing this in at the command line and not haivng it in the profile file and seeing if it works
setenv LD_LIBRARY_PATH /home/oiv50/lib
then do an echo $LD_LI....
 
Old 09-14-2005, 09:12 AM   #3
senthilpr_in
LQ Newbie
 
Registered: Aug 2005
Distribution: FC4 2.6.11-1.1369_FC4smp
Posts: 21

Original Poster
Rep: Reputation: 15
Hi, Yes I'm able to set the env variable in command line. Unable to do so via .cshrc file, so that it is set everytime I login.
Thx for your reply
Senthil
 
Old 02-26-2007, 11:25 AM   #4
linuxter
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
Cannot Set Ld_library_path

I have exactly the same problem, rest of the variables I set in /etc/profile are set fine execpt LD_LIBRARY_PATH (so far). I can set the variable in the shell after login. Is there something I am missing or is it a bug of some sort?
plese let me know, thanks
 
Old 02-26-2007, 12:46 PM   #5
linuxter
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
OK it is some security issue. If you set it in either /etc/bashrc or $HOME/.bashrc it will work. Search for the explain:
Refer to the comment by sperlis in "Problem exporting LD_LIBRARY_PATH" thread.
 
  


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
set Versus env Echo Kilo Linux - General 2 06-09-2009 02:56 AM
set or env? calutateo Linux - Newbie 2 07-24-2005 12:56 PM
how to set LD_LIBRARY_PATH environment variable snakeo2 Linux - Newbie 3 05-25-2005 07:08 PM
Permanently Set a Export Setting (LD_LIBRARY_PATH) nistelrooy Linux - General 1 11-25-2004 11:33 AM
where are the env variables set on boot? Pete Dogg Linux - Software 1 09-10-2003 02:37 AM


All times are GMT -5. The time now is 07:05 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