Is it normal that LD_LIBRARY_PATH variable is missing from an environment?
Clash Royale CLAN TAG#URR8PPP
up vote
14
down vote
favorite
I have found by coincidence that on my Debian Jessie there is no LD_LIBRARY_PATH
variable (to be exact printenv | grep LD
shows nothing related to linker and echo "$LD_LIBRARY_PATH"
shows also nothing).
This is the case in x terminal emulator (which might clear it due to setgid) as well as in basic terminal (Ctrl+Alt+F1).
I know that LD_LIBRARY_PATH
may be considered bad so Debian may block it somehow, but on the other hand there are a few files in /etc/ld.so.conf.d/
that contains some directories to be added to LD_LIBRARY_PATH
. None of my rc files (that I know of) mess with LD_LIBRARY_PATH
either.
Why I don't see an LD_LIBRARY_PATH
variable?
linux environment-variables ld
add a comment |Â
up vote
14
down vote
favorite
I have found by coincidence that on my Debian Jessie there is no LD_LIBRARY_PATH
variable (to be exact printenv | grep LD
shows nothing related to linker and echo "$LD_LIBRARY_PATH"
shows also nothing).
This is the case in x terminal emulator (which might clear it due to setgid) as well as in basic terminal (Ctrl+Alt+F1).
I know that LD_LIBRARY_PATH
may be considered bad so Debian may block it somehow, but on the other hand there are a few files in /etc/ld.so.conf.d/
that contains some directories to be added to LD_LIBRARY_PATH
. None of my rc files (that I know of) mess with LD_LIBRARY_PATH
either.
Why I don't see an LD_LIBRARY_PATH
variable?
linux environment-variables ld
add a comment |Â
up vote
14
down vote
favorite
up vote
14
down vote
favorite
I have found by coincidence that on my Debian Jessie there is no LD_LIBRARY_PATH
variable (to be exact printenv | grep LD
shows nothing related to linker and echo "$LD_LIBRARY_PATH"
shows also nothing).
This is the case in x terminal emulator (which might clear it due to setgid) as well as in basic terminal (Ctrl+Alt+F1).
I know that LD_LIBRARY_PATH
may be considered bad so Debian may block it somehow, but on the other hand there are a few files in /etc/ld.so.conf.d/
that contains some directories to be added to LD_LIBRARY_PATH
. None of my rc files (that I know of) mess with LD_LIBRARY_PATH
either.
Why I don't see an LD_LIBRARY_PATH
variable?
linux environment-variables ld
I have found by coincidence that on my Debian Jessie there is no LD_LIBRARY_PATH
variable (to be exact printenv | grep LD
shows nothing related to linker and echo "$LD_LIBRARY_PATH"
shows also nothing).
This is the case in x terminal emulator (which might clear it due to setgid) as well as in basic terminal (Ctrl+Alt+F1).
I know that LD_LIBRARY_PATH
may be considered bad so Debian may block it somehow, but on the other hand there are a few files in /etc/ld.so.conf.d/
that contains some directories to be added to LD_LIBRARY_PATH
. None of my rc files (that I know of) mess with LD_LIBRARY_PATH
either.
Why I don't see an LD_LIBRARY_PATH
variable?
linux environment-variables ld
linux environment-variables ld
edited Sep 26 '17 at 11:21
Kusalananda
106k14209327
106k14209327
asked Sep 26 '17 at 11:04
calavera.info
291112
291112
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
22
down vote
accepted
Yes, it is normal that you don't have any explicit LD_LIBRARY_PATH
. Read also ldconfig(8) and ld-linux(8) and about the rpath. Notice that ldconfig
updates /etc/ld.so.cache
, not the LD_LIBRARY_PATH
. Sometimes you'll set the rpath of an executable explicitly with -Wl,-rpath,
directory passed to gcc
at link time.
If you need a LD_LIBRARY_PATH
(but you probably should not), set it yourself (e.g. in ~/.bashrc
).
If you need system wide settings, you could e.g. consider adding /usr/local/lib/
in /etc/ld.so.conf
and run ldconfig
after installation of every library there.
AFAIK $LD_LIBRARY_PATH
is used only by the dynamic linker ld-linux.so
(and by dlopen(3) which uses it) after execve(2). See also ldd(1).
Read Drepper's How To Write Shared Libraries for more.
That was my mistake, I though that LD_LIBRARY_PATH is the product of runningldconfig
. Meanwhile it is the input of ldconfig alongside with files in/etc/ld.so.conf
.
â calavera.info
Sep 26 '17 at 11:13
1
My feeling is thatldconfig
don't use$LD_LIBRARY_PATH
(which is only used atld-linux.so
time)
â Basile Starynkevitch
Sep 26 '17 at 11:15
3
@calavera.info it's neither. The dynamic linker usesLD_LIBRARY_PATH
together with the output ofldconfig
at runtime.ldconfig
neither uses nor changesLD_LIBRARY_PATH
.
â hobbs
Sep 26 '17 at 19:37
Now I can see that I had it totally messed up, probably by spending too much time in Java, where "classpath" is virtualy the only configuration of dynamic linking. Everything seems to be clear now, thanks a lot.
â calavera.info
Sep 27 '17 at 8:41
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
22
down vote
accepted
Yes, it is normal that you don't have any explicit LD_LIBRARY_PATH
. Read also ldconfig(8) and ld-linux(8) and about the rpath. Notice that ldconfig
updates /etc/ld.so.cache
, not the LD_LIBRARY_PATH
. Sometimes you'll set the rpath of an executable explicitly with -Wl,-rpath,
directory passed to gcc
at link time.
If you need a LD_LIBRARY_PATH
(but you probably should not), set it yourself (e.g. in ~/.bashrc
).
If you need system wide settings, you could e.g. consider adding /usr/local/lib/
in /etc/ld.so.conf
and run ldconfig
after installation of every library there.
AFAIK $LD_LIBRARY_PATH
is used only by the dynamic linker ld-linux.so
(and by dlopen(3) which uses it) after execve(2). See also ldd(1).
Read Drepper's How To Write Shared Libraries for more.
That was my mistake, I though that LD_LIBRARY_PATH is the product of runningldconfig
. Meanwhile it is the input of ldconfig alongside with files in/etc/ld.so.conf
.
â calavera.info
Sep 26 '17 at 11:13
1
My feeling is thatldconfig
don't use$LD_LIBRARY_PATH
(which is only used atld-linux.so
time)
â Basile Starynkevitch
Sep 26 '17 at 11:15
3
@calavera.info it's neither. The dynamic linker usesLD_LIBRARY_PATH
together with the output ofldconfig
at runtime.ldconfig
neither uses nor changesLD_LIBRARY_PATH
.
â hobbs
Sep 26 '17 at 19:37
Now I can see that I had it totally messed up, probably by spending too much time in Java, where "classpath" is virtualy the only configuration of dynamic linking. Everything seems to be clear now, thanks a lot.
â calavera.info
Sep 27 '17 at 8:41
add a comment |Â
up vote
22
down vote
accepted
Yes, it is normal that you don't have any explicit LD_LIBRARY_PATH
. Read also ldconfig(8) and ld-linux(8) and about the rpath. Notice that ldconfig
updates /etc/ld.so.cache
, not the LD_LIBRARY_PATH
. Sometimes you'll set the rpath of an executable explicitly with -Wl,-rpath,
directory passed to gcc
at link time.
If you need a LD_LIBRARY_PATH
(but you probably should not), set it yourself (e.g. in ~/.bashrc
).
If you need system wide settings, you could e.g. consider adding /usr/local/lib/
in /etc/ld.so.conf
and run ldconfig
after installation of every library there.
AFAIK $LD_LIBRARY_PATH
is used only by the dynamic linker ld-linux.so
(and by dlopen(3) which uses it) after execve(2). See also ldd(1).
Read Drepper's How To Write Shared Libraries for more.
That was my mistake, I though that LD_LIBRARY_PATH is the product of runningldconfig
. Meanwhile it is the input of ldconfig alongside with files in/etc/ld.so.conf
.
â calavera.info
Sep 26 '17 at 11:13
1
My feeling is thatldconfig
don't use$LD_LIBRARY_PATH
(which is only used atld-linux.so
time)
â Basile Starynkevitch
Sep 26 '17 at 11:15
3
@calavera.info it's neither. The dynamic linker usesLD_LIBRARY_PATH
together with the output ofldconfig
at runtime.ldconfig
neither uses nor changesLD_LIBRARY_PATH
.
â hobbs
Sep 26 '17 at 19:37
Now I can see that I had it totally messed up, probably by spending too much time in Java, where "classpath" is virtualy the only configuration of dynamic linking. Everything seems to be clear now, thanks a lot.
â calavera.info
Sep 27 '17 at 8:41
add a comment |Â
up vote
22
down vote
accepted
up vote
22
down vote
accepted
Yes, it is normal that you don't have any explicit LD_LIBRARY_PATH
. Read also ldconfig(8) and ld-linux(8) and about the rpath. Notice that ldconfig
updates /etc/ld.so.cache
, not the LD_LIBRARY_PATH
. Sometimes you'll set the rpath of an executable explicitly with -Wl,-rpath,
directory passed to gcc
at link time.
If you need a LD_LIBRARY_PATH
(but you probably should not), set it yourself (e.g. in ~/.bashrc
).
If you need system wide settings, you could e.g. consider adding /usr/local/lib/
in /etc/ld.so.conf
and run ldconfig
after installation of every library there.
AFAIK $LD_LIBRARY_PATH
is used only by the dynamic linker ld-linux.so
(and by dlopen(3) which uses it) after execve(2). See also ldd(1).
Read Drepper's How To Write Shared Libraries for more.
Yes, it is normal that you don't have any explicit LD_LIBRARY_PATH
. Read also ldconfig(8) and ld-linux(8) and about the rpath. Notice that ldconfig
updates /etc/ld.so.cache
, not the LD_LIBRARY_PATH
. Sometimes you'll set the rpath of an executable explicitly with -Wl,-rpath,
directory passed to gcc
at link time.
If you need a LD_LIBRARY_PATH
(but you probably should not), set it yourself (e.g. in ~/.bashrc
).
If you need system wide settings, you could e.g. consider adding /usr/local/lib/
in /etc/ld.so.conf
and run ldconfig
after installation of every library there.
AFAIK $LD_LIBRARY_PATH
is used only by the dynamic linker ld-linux.so
(and by dlopen(3) which uses it) after execve(2). See also ldd(1).
Read Drepper's How To Write Shared Libraries for more.
edited Sep 26 '17 at 11:19
answered Sep 26 '17 at 11:06
Basile Starynkevitch
7,9231940
7,9231940
That was my mistake, I though that LD_LIBRARY_PATH is the product of runningldconfig
. Meanwhile it is the input of ldconfig alongside with files in/etc/ld.so.conf
.
â calavera.info
Sep 26 '17 at 11:13
1
My feeling is thatldconfig
don't use$LD_LIBRARY_PATH
(which is only used atld-linux.so
time)
â Basile Starynkevitch
Sep 26 '17 at 11:15
3
@calavera.info it's neither. The dynamic linker usesLD_LIBRARY_PATH
together with the output ofldconfig
at runtime.ldconfig
neither uses nor changesLD_LIBRARY_PATH
.
â hobbs
Sep 26 '17 at 19:37
Now I can see that I had it totally messed up, probably by spending too much time in Java, where "classpath" is virtualy the only configuration of dynamic linking. Everything seems to be clear now, thanks a lot.
â calavera.info
Sep 27 '17 at 8:41
add a comment |Â
That was my mistake, I though that LD_LIBRARY_PATH is the product of runningldconfig
. Meanwhile it is the input of ldconfig alongside with files in/etc/ld.so.conf
.
â calavera.info
Sep 26 '17 at 11:13
1
My feeling is thatldconfig
don't use$LD_LIBRARY_PATH
(which is only used atld-linux.so
time)
â Basile Starynkevitch
Sep 26 '17 at 11:15
3
@calavera.info it's neither. The dynamic linker usesLD_LIBRARY_PATH
together with the output ofldconfig
at runtime.ldconfig
neither uses nor changesLD_LIBRARY_PATH
.
â hobbs
Sep 26 '17 at 19:37
Now I can see that I had it totally messed up, probably by spending too much time in Java, where "classpath" is virtualy the only configuration of dynamic linking. Everything seems to be clear now, thanks a lot.
â calavera.info
Sep 27 '17 at 8:41
That was my mistake, I though that LD_LIBRARY_PATH is the product of running
ldconfig
. Meanwhile it is the input of ldconfig alongside with files in /etc/ld.so.conf
.â calavera.info
Sep 26 '17 at 11:13
That was my mistake, I though that LD_LIBRARY_PATH is the product of running
ldconfig
. Meanwhile it is the input of ldconfig alongside with files in /etc/ld.so.conf
.â calavera.info
Sep 26 '17 at 11:13
1
1
My feeling is that
ldconfig
don't use $LD_LIBRARY_PATH
(which is only used at ld-linux.so
time)â Basile Starynkevitch
Sep 26 '17 at 11:15
My feeling is that
ldconfig
don't use $LD_LIBRARY_PATH
(which is only used at ld-linux.so
time)â Basile Starynkevitch
Sep 26 '17 at 11:15
3
3
@calavera.info it's neither. The dynamic linker uses
LD_LIBRARY_PATH
together with the output of ldconfig
at runtime. ldconfig
neither uses nor changes LD_LIBRARY_PATH
.â hobbs
Sep 26 '17 at 19:37
@calavera.info it's neither. The dynamic linker uses
LD_LIBRARY_PATH
together with the output of ldconfig
at runtime. ldconfig
neither uses nor changes LD_LIBRARY_PATH
.â hobbs
Sep 26 '17 at 19:37
Now I can see that I had it totally messed up, probably by spending too much time in Java, where "classpath" is virtualy the only configuration of dynamic linking. Everything seems to be clear now, thanks a lot.
â calavera.info
Sep 27 '17 at 8:41
Now I can see that I had it totally messed up, probably by spending too much time in Java, where "classpath" is virtualy the only configuration of dynamic linking. Everything seems to be clear now, thanks a lot.
â calavera.info
Sep 27 '17 at 8:41
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f394508%2fis-it-normal-that-ld-library-path-variable-is-missing-from-an-environment%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password