LD_LIBRARY_PATH disappeared?

Hello:

I am using 13.2 X64 KDE system. I noticed that when I type command:

echo $LD_LIBRARY_PATH

it said:

LD_LIBRARY_PATH: Undefined variable.

I am just wondering is this global various decrepted in latest openSUSE?

thx a lot

I have 12.3, 13.1 and 13.2 and

echo "$LD_LIBRARY_PATH"

returns nothing so what global variable are you asking about?

Is this causing some issue/error somewhere?
You can set this on the terminal as


export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/lib

If you want to make this permanent add this to .bash_profile if using bash shell

You shouldn’t have to set that to anything.
It is empty normally, since ever.
Setting it is just a hack to run programs that are not properly installed IMHO.

Still, the error message about it being an “Undefined variable” is strange.
Exactly where do you type that command to get that error? And/or which shell are you using?
Bash does not say that here, even for definitely undefined variables:

wolfi@amiga:~> echo $kjgljkdfsgjgh

wolfi@amiga:~> 

This is the only thing that comes to mind.

echo "${LD_LIBRARY_PATH:-Undefined variable}"

prints

Undefined variable

or

echo "${LD_LIBRARY_PATH?Undefined variable}"

which prints

bash: LD_LIBRARY_PATH: Undefined variable

Which one is it?

It is normal for LD_LIBRARY_PATH to be undefined. Typically, libraries are found at standard places. One defines LD_LIBRARY_PATH to override that default. Best to leave it undefined unless you really understand what you are doing.

There’s another point here. You appear to be using “csh” as your shell. That’s what I use, too.

csh/tcsh: LD_LIBRARY_PATH: Undefined variable.

sh/bash: (just outputs an empty line)

thanks a lot for the reply.

Yes, I am using tcsh. I never have this problem in all other previous version. I thought this various should be a system default one…

What problem?
You still didn’t tell why you think this is a problem or what problem you have with LD_LIBRARY_PATH being undefined.

That variable is undefined by default, and unnecessary. And that’s not new.

If you want/need it being set to something, you have to set it.

Since it isn’t actually a problem, then I guess you don’t have this problem now, either.

You might have previously been running some software that needed LD_LIBRARY_PATH to be defined. Usually, it is better to not have it defined unless really needed.

The default system shell is “bash”. If you don’t do a lot of command line stuff, you probably won’t notice the difference.