LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 07-29-2004, 03:09 PM   #1
nodnarb
LQ Newbie
 
Registered: Jul 2004
Location: TN, USA
Distribution: Mandrake
Posts: 23

Rep: Reputation: 15
Question Viewing the"Library Path"


Does anyone know how to view and modify your library path?
 
Old 07-29-2004, 03:24 PM   #2
Vookimedlo
Member
 
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Rep: Reputation: 34
view it by:
cat /etc/ld.so.conf

after changes invoke:
/sbin/ldconfig



sometimes this path is in LD_LIBRARY variable
 
Old 07-29-2004, 03:26 PM   #3
linuxlastslonge
Member
 
Registered: Jun 2002
Location: Franklin, IN
Distribution: Debian, CentOS, Mac OS X
Posts: 158

Rep: Reputation: 30
when you say `view`, do you mean list the directories in your path, or simply list the files in /lib ?





 
Old 07-29-2004, 03:29 PM   #4
Corona4456
Member
 
Registered: Jul 2004
Distribution: SuSE 9.1
Posts: 66

Rep: Reputation: 15
Well that depends on what PATH you want to set. If you know the name of your variable then figure out what shell you are running (ksh, csh, bash... etc). If you don't know that then type 'echo $SHELL' and that should output the default shell that is used (more than likely bash). If it's bash... then you do the following, however, remember to replace PATH with the environment variable you intend on modifying:

export PATH=$PATH:/new/path/added/ <enter>

And that should work... to check type echo $PATH and see if your path has been added.

If you have a csh shell then you can do the following:

setenv PATH=$PATH:/new/path/added/ <enter>

Now these paths won't be permanent... if you want to do this permanently then put these lines your .cshrc or .bashrc files.

Last edited by Corona4456; 07-29-2004 at 03:32 PM.
 
Old 07-29-2004, 03:54 PM   #5
nodnarb
LQ Newbie
 
Registered: Jul 2004
Location: TN, USA
Distribution: Mandrake
Posts: 23

Original Poster
Rep: Reputation: 15
I mean how do you add a path (like for your PATH environment, its export PATH= $PATH/dir/).
 
Old 11-23-2004, 01:51 PM   #6
boydasilva
LQ Newbie
 
Registered: Nov 2004
Location: Manchester
Distribution: Suse 10.0
Posts: 27

Rep: Reputation: 15
I've got a similar problem, I can't get the path changes to save, and I don't have a .tschrc file, only .bashrc and .bash_profile. I'm quite sure that I'm running tcsh, cos when I type echo $SHELL, it returns /bin/tcsh.

How can I add path changes to .tschrc if I don't have one?
 
Old 11-23-2004, 03:02 PM   #7
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
u o
stolen thread

Quote:
Originally posted by boydasilva
I'm quite sure that I'm running tcsh, cos when I type echo $SHELL, it returns /bin/tcsh.
How can I add path changes to .tschrc if I don't have one?
make one.
emacs ~/.tschrc
or change to bash
edit /etc/passwd
make for your username like
username:x:<number>:<number>::/home/username:/bin/bash

Quote:
I mean how do you add a path (like for your PATH environment, its export PATH= $PATH/dir/).
better to add the lib path to /etc/ld.so.conf
and as root run ldconfig
that to set the lib path variable

LD_LIBRARY_PATH
for runtime lib path

is usefull but an older and slower way of doing it
ld.so.conf is compiled and cached (faster and smarter)
developers use LD_LIBRARY_PATH mostly for temporary changes for testing

Last edited by foo_bar_foo; 11-23-2004 at 03:03 PM.
 
Old 11-24-2004, 01:45 PM   #8
boydasilva
LQ Newbie
 
Registered: Nov 2004
Location: Manchester
Distribution: Suse 10.0
Posts: 27

Rep: Reputation: 15
Editing .tcshrc file

I don't seem to be able to make this work. I've made a .tcshrc file, which looks a bit like this:
################################################################
# .tcshrc

# User specific aliases and functions

alias rm 'rm -i'
alias cp 'cp -i'
alias mv 'mv -i'

# Source global definitions
if [ -f /etc/tcshrc ]; then
. /etc/tcshrc
fi

################################################################

Now when I open a shell, i get this message:

if: Expression Syntax.

What's wrong with my if statement? Have I missed something out?

Also, I need to add these statements to the .tcshrc in order to get a program to run:
setenv LD_LIBRARY_PATH $HOME/EMAN/lib
set path = (. $HOME/EMAN/bin $HOME/bin /bin)

But when I add these to the .tcshrc nothing changes. What exactly am I doing wrong?


EDIT:
Should have posted this as a new thread. Sorry!

Last edited by boydasilva; 11-24-2004 at 01:47 PM.
 
  


Reply



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
"Could not init font path element""Unix /: 7100 removing from list/ zameer_india Linux - Networking 7 07-03-2006 06:11 AM
"Go back to the page you were previously viewing" - From User CP vharishankar LQ Suggestions & Feedback 2 06-13-2005 08:22 AM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 02:32 PM
Cedega from Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Software 0 03-30-2005 11:24 AM
Cedega and Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Games 0 03-26-2005 02:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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