Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I have xandros linux 2.6.9. and everything is smooth until
I try to run a new executable file named ABC and it complains symbol
__libc_stack_end, version GLIBC_2.1 not defined in file ld-linux.so.2
I check my /lib and found my ld-linux.so.2 is ld-2.3.2.so and libc-2.3.2.so
So, I get more later libc which is ld-2.5.so and libc-2.5.so I think that's the latest. I put the new libc into a folder and use LD_LIBRARY_PATH path to point to the new library.
Still, the execution file ABC doesn't run correctly. I know both libc-2.3.2 and libc_2.5 are setup correctly because other files able to run.
I believe it's safer to use LD_LIBRARY_PATH variable, if it doesn't work, it just go back to default.
If you use /etc/ld.so.conf and something goes wrong, it will crash your system...
Well, I have been compiling binaries from source for many years and using ld.so.conf to add library directories for the same amount of time and I have never crashed a machine.
However, the real point of my question was what is the current contents of your ld.so.conf file because the directories in there will also be searched for libraries.
Also, LD_LIBRARY_PATH only affects the current environment, so processes that are spawned by other means will not have the LD_LIBRARY_PATH set to the same value. If you do set the LD_LIBRARY_PATH in some global place, it is the same as adding a line to ld.so.conf, and therefore entails the same risk.
Now, once again, what are the current contents of your ld.so.conf file. It may be corrupt, or it may not be set up correctly.
Also, LD_LIBRARY_PATH only affects the current environment, so processes that are spawned by other means will not have the LD_LIBRARY_PATH set to the same value. If you do set the LD_LIBRARY_PATH in some global place, it is the same as adding a line to ld.so.conf, and therefore entails the same risk.
Now, once again, what are the current contents of your ld.so.conf file. It may be corrupt, or it may not be set up correctly.
Hi,
My ld.so.conf only contains /usr/X11R6/lib. That's all.
ld.so.conf tells the system what the library in the cache.
System will check for LD_LIBRARY_PATH first and then the cache.
The system will automatically search for /lib and /usr/lib if no LD_LIBRARY_PATH specified. SO, when I specified LD_LIBRARY_PATH=myfolder/lib then it will override the default. IF this is corrupted, then all my binaries will not be able to execute. But only this particular ABC binary has issue.
Hi,
My ld.so.conf only contains /usr/X11R6/lib. That's all.
ld.so.conf tells the system what the library in the cache.
System will check for LD_LIBRARY_PATH first and then the cache.
The system will automatically search for /lib and /usr/lib if no LD_LIBRARY_PATH specified. SO, when I specified LD_LIBRARY_PATH=myfolder/lib then it will override the default. IF this is corrupted, then all my binaries will not be able to execute. But only this particular ABC binary has issue.
thx
Most system processes are spawned from init with a limited set of default environment variables. You'll have to poke around in /etc on your particular system to see what the default LD_LIBRARY_PATH is set to.
You will probably want to add "/usr/lib" and "/usr/local/lib" to to "ld.so.conf" and then run "ldconfig" to refresh the cache. This should get your program running.
Most system processes are spawned from init with a limited set of default environment variables. You'll have to poke around in /etc on your particular system to see what the default LD_LIBRARY_PATH is set to.
You will probably want to add "/usr/lib" and "/usr/local/lib" to to "ld.so.conf" and then run "ldconfig" to refresh the cache. This should get your program running.
I have a simple question.
Let say I have a system with redhat /lib/ld-2.3.2.so 101KB
then another system with suse /lib/ld-2.3.2.so 88KB
Since the glibc is the same version both 2.3.2, why they have different size, which indicate they are 2 different file.
If I put the REDHAT ld-2.3.2.so into SUSE,could that cause error?
I have a simple question.
Let say I have a system with redhat /lib/ld-2.3.2.so 101KB
then another system with suse /lib/ld-2.3.2.so 88KB
Since the glibc is the same version both 2.3.2, why they have different size, which indicate they are 2 different file.
If I put the REDHAT ld-2.3.2.so into SUSE,could that cause error?
You can try, but it may be dangerous.
If you are want to move executables between different distro you can try to use magicErmine (http://magicErmine.com) or statifier (http://statifier.sf.net).
Both of them create self-contained exe without any dependencies.
I have a simple question.
Let say I have a system with redhat /lib/ld-2.3.2.so 101KB
then another system with suse /lib/ld-2.3.2.so 88KB
Since the glibc is the same version both 2.3.2, why they have different size, which indicate they are 2 different file.
If I put the REDHAT ld-2.3.2.so into SUSE,could that cause error?
Yes. Red Hat and Novell both maintain their own internal versions of a lot of Linux programs (most notably gcc) and they back port patches from the main-line version.
Also, you may be moving a library from an i686 system to an i586 system and you might cause a system crash.
Moving libraries willy-nilly from one distro to another is a very bad idea.
I find out that the linux system will look and use file in /lib no matter what I try to tell the system to use /mystuff/lib through
LD_LIBRARY_PATH of ld.so.conf.
I did a test that copy the original /lib folder into /usr/test/lib
and did a LD_LIBRARY_PATH and also ld.so.conf pointing to /usr/test/lib.
now I rename /lib to /lib-old. So there's no more /lib available. Now all the shells are not working because /lib is no more.
I thought it would work because the original /lib copied to /usr/test/lib and it's pointing there. I thought if the system cannot find /lib and it smart enough to search /usr/test/lib and use the original library in new location.but it's not the case.
I find out that the linux system will look and use file in /lib no matter what I try to tell the system to use /mystuff/lib through
LD_LIBRARY_PATH of ld.so.conf.
I did a test that copy the original /lib folder into /usr/test/lib
and did a LD_LIBRARY_PATH and also ld.so.conf pointing to /usr/test/lib.
now I rename /lib to /lib-old. So there's no more /lib available. Now all the shells are not working because /lib is no more.
I thought it would work because the original /lib copied to /usr/test/lib and it's pointing there. I thought if the system cannot find /lib and it smart enough to search /usr/test/lib and use the original library in new location.but it's not the case.
I wonder why.
thx
Two things :
1) Path to program loader is hardcoded in the program and it's
/lib/ld-linux.so.2
It's loaded by the kernel and neither ld.conf nor LD_LIBRARY_PATH used to find it.
So, when you move /lib to /lib-old you made impossible to find
ld-linux.so.2
2) ld.conf not used to find libraries.
Used only /etc/ld.so.cache.
This file generated from /etc/ld.so.conf by the /sbin/ldconfig
program. I.e after you changed ld.so.conf in order to make this change effective you have to run /sbin/ldconfig.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.