Where does Ubuntu look for shared libraries?
When I run a process that links to a shared library at runtime (linked when the process starts, not linked later with dlload()), where does it look for that shared library (.so) file other than LD_LIBRARY_PATH?
Background:
I have some C++ code that I wrote that uses a particular third-party library. I have installed the library and compiled my code on two different platforms, both Ubuntu but different versions, and different versions of gcc as well. The library was compiled and installed from source, and is located in /usr/local/lib on both platforms. When I compile my code, I link with the pkg-config --libs parameters for the third-party library and I've verified that pkg-config --libs returns the exact same thing on both platforms.
My code compiles successfully on both platforms, and LD_LIBRARY_PATH is not defined (or defined as empty: "") on both platforms. However, when I run it on one platoform it works fine, and on the other I get this error:
error while loading shared libraries: libthrift-0.9.0.so: cannot open shared object file: No such file or directory
Funnily enough, the ones that doesn't work is the newer version of Ubuntu and gcc. :/
So I'm trying to figure out how the working one is able to locate the library, so that I can make the broken one locate the library in the same way. (i.e., without setting LD_LIBRARY_PATH)
Update:
Here's my output from cat /etc/ld.so.conf.d/*
...on the working (older) system:
/usr/lib/mesa
/usr/lib32/mesa
/usr/lib/alsa-lib
# libc default configuration
/usr/local/lib
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
...on the broken (newer) system:
# libc default configuration
/usr/local/lib
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/mesa
libraries shared-library dynamic-linking
add a comment |
When I run a process that links to a shared library at runtime (linked when the process starts, not linked later with dlload()), where does it look for that shared library (.so) file other than LD_LIBRARY_PATH?
Background:
I have some C++ code that I wrote that uses a particular third-party library. I have installed the library and compiled my code on two different platforms, both Ubuntu but different versions, and different versions of gcc as well. The library was compiled and installed from source, and is located in /usr/local/lib on both platforms. When I compile my code, I link with the pkg-config --libs parameters for the third-party library and I've verified that pkg-config --libs returns the exact same thing on both platforms.
My code compiles successfully on both platforms, and LD_LIBRARY_PATH is not defined (or defined as empty: "") on both platforms. However, when I run it on one platoform it works fine, and on the other I get this error:
error while loading shared libraries: libthrift-0.9.0.so: cannot open shared object file: No such file or directory
Funnily enough, the ones that doesn't work is the newer version of Ubuntu and gcc. :/
So I'm trying to figure out how the working one is able to locate the library, so that I can make the broken one locate the library in the same way. (i.e., without setting LD_LIBRARY_PATH)
Update:
Here's my output from cat /etc/ld.so.conf.d/*
...on the working (older) system:
/usr/lib/mesa
/usr/lib32/mesa
/usr/lib/alsa-lib
# libc default configuration
/usr/local/lib
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
...on the broken (newer) system:
# libc default configuration
/usr/local/lib
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/mesa
libraries shared-library dynamic-linking
1
I think those places are defined in/etc/ld.so.conf.d/*.conf, but I'm not sure of it.
– Salem
Sep 25 '13 at 21:18
Seems like it, but see my update to the OQ for the contents of those files... So it looks like it should find/usr/local/lib/libthrift-0.9.0.sobut still it gives the errorerror while loading shared libraries: libthrift-0.9.0.so: cannot open shared object file: No such file or directory... Is there any reason it would not pick up a directory from/etc/ld.so.conf.d/*.conf?
– Dave Lillethun
Sep 25 '13 at 21:32
3
Try to runsudo ldconfig -vas suggested below. If it still does not work update your question with the output ofldd /path/to/your/application.
– Salem
Sep 25 '13 at 21:45
add a comment |
When I run a process that links to a shared library at runtime (linked when the process starts, not linked later with dlload()), where does it look for that shared library (.so) file other than LD_LIBRARY_PATH?
Background:
I have some C++ code that I wrote that uses a particular third-party library. I have installed the library and compiled my code on two different platforms, both Ubuntu but different versions, and different versions of gcc as well. The library was compiled and installed from source, and is located in /usr/local/lib on both platforms. When I compile my code, I link with the pkg-config --libs parameters for the third-party library and I've verified that pkg-config --libs returns the exact same thing on both platforms.
My code compiles successfully on both platforms, and LD_LIBRARY_PATH is not defined (or defined as empty: "") on both platforms. However, when I run it on one platoform it works fine, and on the other I get this error:
error while loading shared libraries: libthrift-0.9.0.so: cannot open shared object file: No such file or directory
Funnily enough, the ones that doesn't work is the newer version of Ubuntu and gcc. :/
So I'm trying to figure out how the working one is able to locate the library, so that I can make the broken one locate the library in the same way. (i.e., without setting LD_LIBRARY_PATH)
Update:
Here's my output from cat /etc/ld.so.conf.d/*
...on the working (older) system:
/usr/lib/mesa
/usr/lib32/mesa
/usr/lib/alsa-lib
# libc default configuration
/usr/local/lib
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
...on the broken (newer) system:
# libc default configuration
/usr/local/lib
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/mesa
libraries shared-library dynamic-linking
When I run a process that links to a shared library at runtime (linked when the process starts, not linked later with dlload()), where does it look for that shared library (.so) file other than LD_LIBRARY_PATH?
Background:
I have some C++ code that I wrote that uses a particular third-party library. I have installed the library and compiled my code on two different platforms, both Ubuntu but different versions, and different versions of gcc as well. The library was compiled and installed from source, and is located in /usr/local/lib on both platforms. When I compile my code, I link with the pkg-config --libs parameters for the third-party library and I've verified that pkg-config --libs returns the exact same thing on both platforms.
My code compiles successfully on both platforms, and LD_LIBRARY_PATH is not defined (or defined as empty: "") on both platforms. However, when I run it on one platoform it works fine, and on the other I get this error:
error while loading shared libraries: libthrift-0.9.0.so: cannot open shared object file: No such file or directory
Funnily enough, the ones that doesn't work is the newer version of Ubuntu and gcc. :/
So I'm trying to figure out how the working one is able to locate the library, so that I can make the broken one locate the library in the same way. (i.e., without setting LD_LIBRARY_PATH)
Update:
Here's my output from cat /etc/ld.so.conf.d/*
...on the working (older) system:
/usr/lib/mesa
/usr/lib32/mesa
/usr/lib/alsa-lib
# libc default configuration
/usr/local/lib
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
...on the broken (newer) system:
# libc default configuration
/usr/local/lib
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/mesa
libraries shared-library dynamic-linking
libraries shared-library dynamic-linking
edited Sep 25 '13 at 21:33
Dave Lillethun
asked Sep 25 '13 at 21:10
Dave LillethunDave Lillethun
210127
210127
1
I think those places are defined in/etc/ld.so.conf.d/*.conf, but I'm not sure of it.
– Salem
Sep 25 '13 at 21:18
Seems like it, but see my update to the OQ for the contents of those files... So it looks like it should find/usr/local/lib/libthrift-0.9.0.sobut still it gives the errorerror while loading shared libraries: libthrift-0.9.0.so: cannot open shared object file: No such file or directory... Is there any reason it would not pick up a directory from/etc/ld.so.conf.d/*.conf?
– Dave Lillethun
Sep 25 '13 at 21:32
3
Try to runsudo ldconfig -vas suggested below. If it still does not work update your question with the output ofldd /path/to/your/application.
– Salem
Sep 25 '13 at 21:45
add a comment |
1
I think those places are defined in/etc/ld.so.conf.d/*.conf, but I'm not sure of it.
– Salem
Sep 25 '13 at 21:18
Seems like it, but see my update to the OQ for the contents of those files... So it looks like it should find/usr/local/lib/libthrift-0.9.0.sobut still it gives the errorerror while loading shared libraries: libthrift-0.9.0.so: cannot open shared object file: No such file or directory... Is there any reason it would not pick up a directory from/etc/ld.so.conf.d/*.conf?
– Dave Lillethun
Sep 25 '13 at 21:32
3
Try to runsudo ldconfig -vas suggested below. If it still does not work update your question with the output ofldd /path/to/your/application.
– Salem
Sep 25 '13 at 21:45
1
1
I think those places are defined in
/etc/ld.so.conf.d/*.conf, but I'm not sure of it.– Salem
Sep 25 '13 at 21:18
I think those places are defined in
/etc/ld.so.conf.d/*.conf, but I'm not sure of it.– Salem
Sep 25 '13 at 21:18
Seems like it, but see my update to the OQ for the contents of those files... So it looks like it should find
/usr/local/lib/libthrift-0.9.0.so but still it gives the error error while loading shared libraries: libthrift-0.9.0.so: cannot open shared object file: No such file or directory... Is there any reason it would not pick up a directory from /etc/ld.so.conf.d/*.conf?– Dave Lillethun
Sep 25 '13 at 21:32
Seems like it, but see my update to the OQ for the contents of those files... So it looks like it should find
/usr/local/lib/libthrift-0.9.0.so but still it gives the error error while loading shared libraries: libthrift-0.9.0.so: cannot open shared object file: No such file or directory... Is there any reason it would not pick up a directory from /etc/ld.so.conf.d/*.conf?– Dave Lillethun
Sep 25 '13 at 21:32
3
3
Try to run
sudo ldconfig -v as suggested below. If it still does not work update your question with the output of ldd /path/to/your/application.– Salem
Sep 25 '13 at 21:45
Try to run
sudo ldconfig -v as suggested below. If it still does not work update your question with the output of ldd /path/to/your/application.– Salem
Sep 25 '13 at 21:45
add a comment |
2 Answers
2
active
oldest
votes
This whole path business is related to something called multi-arch.
Basically it's to allow you to have 32bit and 64bit libraries on the same system.
After you copied the file, did you happen to run ldconfig?
ldconfig creates, updates, and removes the necessary links and cache
(for use by the run-time linker, ld.so) to the most recent shared
libraries found in the directories specified on the command line, in
the file /etc/ld.so.conf, and in the trusted directories (/usr/lib and
/lib). ldconfig checks the header and file names of the libraries it
encounters when determining which versions should have their links
updated. ldconfig ignores symbolic links when scanning for libraries.
I ransudo ldconfigand that fixed the problem! (Didn't need to recompile my code or anything...) I just want to understand, though... You said "After you copied the file," but I did not copy a file. Do you mean after I built & installed the library, or after I compiled my program?
– Dave Lillethun
Sep 25 '13 at 22:04
After you placed it where you placed it. Basically a library cache is built. I think rebooting may also rebuild the cache.
– Matt H
Sep 26 '13 at 1:35
I may be mistaken, but I believe I had rebooted since installing the library... However,sudo ldconfigdid the trick. Is this something libraries often automatically run for your as part of their install, and this one for some reason didn't? Just wondering why I don't "normally" have to do this, but did only in this case...
– Dave Lillethun
Sep 26 '13 at 16:28
Usually the package install will run ldconfig during the install process I think. Maybe the version on your newer distro isn't doing it for some reason.
– Matt H
Sep 26 '13 at 21:38
add a comment |
The information contained in the above question AND first (and only ATT) answer, helped me resolve *a similar * issue of mine on WSL Ubuntu (on Win10 64)!
In my case the executable couldn't find a library.
I ultimately noticed that the newly-made library got positioned in /usr/lib64 , but the multi-arch lines of /etc/ld.so.conf.d/x86_64-linux-gnu.conf did not include that directory.
So I ran
sudo ldconfig /usr/lib64
and that finally fixed it. (running it alone without the directory parameter did not make it 'magically' find the libraries BTW.)
It's unclear whether 'restarting' my WSL bash helped... I think that wasn't even needed.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f350068%2fwhere-does-ubuntu-look-for-shared-libraries%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
This whole path business is related to something called multi-arch.
Basically it's to allow you to have 32bit and 64bit libraries on the same system.
After you copied the file, did you happen to run ldconfig?
ldconfig creates, updates, and removes the necessary links and cache
(for use by the run-time linker, ld.so) to the most recent shared
libraries found in the directories specified on the command line, in
the file /etc/ld.so.conf, and in the trusted directories (/usr/lib and
/lib). ldconfig checks the header and file names of the libraries it
encounters when determining which versions should have their links
updated. ldconfig ignores symbolic links when scanning for libraries.
I ransudo ldconfigand that fixed the problem! (Didn't need to recompile my code or anything...) I just want to understand, though... You said "After you copied the file," but I did not copy a file. Do you mean after I built & installed the library, or after I compiled my program?
– Dave Lillethun
Sep 25 '13 at 22:04
After you placed it where you placed it. Basically a library cache is built. I think rebooting may also rebuild the cache.
– Matt H
Sep 26 '13 at 1:35
I may be mistaken, but I believe I had rebooted since installing the library... However,sudo ldconfigdid the trick. Is this something libraries often automatically run for your as part of their install, and this one for some reason didn't? Just wondering why I don't "normally" have to do this, but did only in this case...
– Dave Lillethun
Sep 26 '13 at 16:28
Usually the package install will run ldconfig during the install process I think. Maybe the version on your newer distro isn't doing it for some reason.
– Matt H
Sep 26 '13 at 21:38
add a comment |
This whole path business is related to something called multi-arch.
Basically it's to allow you to have 32bit and 64bit libraries on the same system.
After you copied the file, did you happen to run ldconfig?
ldconfig creates, updates, and removes the necessary links and cache
(for use by the run-time linker, ld.so) to the most recent shared
libraries found in the directories specified on the command line, in
the file /etc/ld.so.conf, and in the trusted directories (/usr/lib and
/lib). ldconfig checks the header and file names of the libraries it
encounters when determining which versions should have their links
updated. ldconfig ignores symbolic links when scanning for libraries.
I ransudo ldconfigand that fixed the problem! (Didn't need to recompile my code or anything...) I just want to understand, though... You said "After you copied the file," but I did not copy a file. Do you mean after I built & installed the library, or after I compiled my program?
– Dave Lillethun
Sep 25 '13 at 22:04
After you placed it where you placed it. Basically a library cache is built. I think rebooting may also rebuild the cache.
– Matt H
Sep 26 '13 at 1:35
I may be mistaken, but I believe I had rebooted since installing the library... However,sudo ldconfigdid the trick. Is this something libraries often automatically run for your as part of their install, and this one for some reason didn't? Just wondering why I don't "normally" have to do this, but did only in this case...
– Dave Lillethun
Sep 26 '13 at 16:28
Usually the package install will run ldconfig during the install process I think. Maybe the version on your newer distro isn't doing it for some reason.
– Matt H
Sep 26 '13 at 21:38
add a comment |
This whole path business is related to something called multi-arch.
Basically it's to allow you to have 32bit and 64bit libraries on the same system.
After you copied the file, did you happen to run ldconfig?
ldconfig creates, updates, and removes the necessary links and cache
(for use by the run-time linker, ld.so) to the most recent shared
libraries found in the directories specified on the command line, in
the file /etc/ld.so.conf, and in the trusted directories (/usr/lib and
/lib). ldconfig checks the header and file names of the libraries it
encounters when determining which versions should have their links
updated. ldconfig ignores symbolic links when scanning for libraries.
This whole path business is related to something called multi-arch.
Basically it's to allow you to have 32bit and 64bit libraries on the same system.
After you copied the file, did you happen to run ldconfig?
ldconfig creates, updates, and removes the necessary links and cache
(for use by the run-time linker, ld.so) to the most recent shared
libraries found in the directories specified on the command line, in
the file /etc/ld.so.conf, and in the trusted directories (/usr/lib and
/lib). ldconfig checks the header and file names of the libraries it
encounters when determining which versions should have their links
updated. ldconfig ignores symbolic links when scanning for libraries.
answered Sep 25 '13 at 21:42
Matt HMatt H
1,51452033
1,51452033
I ransudo ldconfigand that fixed the problem! (Didn't need to recompile my code or anything...) I just want to understand, though... You said "After you copied the file," but I did not copy a file. Do you mean after I built & installed the library, or after I compiled my program?
– Dave Lillethun
Sep 25 '13 at 22:04
After you placed it where you placed it. Basically a library cache is built. I think rebooting may also rebuild the cache.
– Matt H
Sep 26 '13 at 1:35
I may be mistaken, but I believe I had rebooted since installing the library... However,sudo ldconfigdid the trick. Is this something libraries often automatically run for your as part of their install, and this one for some reason didn't? Just wondering why I don't "normally" have to do this, but did only in this case...
– Dave Lillethun
Sep 26 '13 at 16:28
Usually the package install will run ldconfig during the install process I think. Maybe the version on your newer distro isn't doing it for some reason.
– Matt H
Sep 26 '13 at 21:38
add a comment |
I ransudo ldconfigand that fixed the problem! (Didn't need to recompile my code or anything...) I just want to understand, though... You said "After you copied the file," but I did not copy a file. Do you mean after I built & installed the library, or after I compiled my program?
– Dave Lillethun
Sep 25 '13 at 22:04
After you placed it where you placed it. Basically a library cache is built. I think rebooting may also rebuild the cache.
– Matt H
Sep 26 '13 at 1:35
I may be mistaken, but I believe I had rebooted since installing the library... However,sudo ldconfigdid the trick. Is this something libraries often automatically run for your as part of their install, and this one for some reason didn't? Just wondering why I don't "normally" have to do this, but did only in this case...
– Dave Lillethun
Sep 26 '13 at 16:28
Usually the package install will run ldconfig during the install process I think. Maybe the version on your newer distro isn't doing it for some reason.
– Matt H
Sep 26 '13 at 21:38
I ran
sudo ldconfig and that fixed the problem! (Didn't need to recompile my code or anything...) I just want to understand, though... You said "After you copied the file," but I did not copy a file. Do you mean after I built & installed the library, or after I compiled my program?– Dave Lillethun
Sep 25 '13 at 22:04
I ran
sudo ldconfig and that fixed the problem! (Didn't need to recompile my code or anything...) I just want to understand, though... You said "After you copied the file," but I did not copy a file. Do you mean after I built & installed the library, or after I compiled my program?– Dave Lillethun
Sep 25 '13 at 22:04
After you placed it where you placed it. Basically a library cache is built. I think rebooting may also rebuild the cache.
– Matt H
Sep 26 '13 at 1:35
After you placed it where you placed it. Basically a library cache is built. I think rebooting may also rebuild the cache.
– Matt H
Sep 26 '13 at 1:35
I may be mistaken, but I believe I had rebooted since installing the library... However,
sudo ldconfig did the trick. Is this something libraries often automatically run for your as part of their install, and this one for some reason didn't? Just wondering why I don't "normally" have to do this, but did only in this case...– Dave Lillethun
Sep 26 '13 at 16:28
I may be mistaken, but I believe I had rebooted since installing the library... However,
sudo ldconfig did the trick. Is this something libraries often automatically run for your as part of their install, and this one for some reason didn't? Just wondering why I don't "normally" have to do this, but did only in this case...– Dave Lillethun
Sep 26 '13 at 16:28
Usually the package install will run ldconfig during the install process I think. Maybe the version on your newer distro isn't doing it for some reason.
– Matt H
Sep 26 '13 at 21:38
Usually the package install will run ldconfig during the install process I think. Maybe the version on your newer distro isn't doing it for some reason.
– Matt H
Sep 26 '13 at 21:38
add a comment |
The information contained in the above question AND first (and only ATT) answer, helped me resolve *a similar * issue of mine on WSL Ubuntu (on Win10 64)!
In my case the executable couldn't find a library.
I ultimately noticed that the newly-made library got positioned in /usr/lib64 , but the multi-arch lines of /etc/ld.so.conf.d/x86_64-linux-gnu.conf did not include that directory.
So I ran
sudo ldconfig /usr/lib64
and that finally fixed it. (running it alone without the directory parameter did not make it 'magically' find the libraries BTW.)
It's unclear whether 'restarting' my WSL bash helped... I think that wasn't even needed.
add a comment |
The information contained in the above question AND first (and only ATT) answer, helped me resolve *a similar * issue of mine on WSL Ubuntu (on Win10 64)!
In my case the executable couldn't find a library.
I ultimately noticed that the newly-made library got positioned in /usr/lib64 , but the multi-arch lines of /etc/ld.so.conf.d/x86_64-linux-gnu.conf did not include that directory.
So I ran
sudo ldconfig /usr/lib64
and that finally fixed it. (running it alone without the directory parameter did not make it 'magically' find the libraries BTW.)
It's unclear whether 'restarting' my WSL bash helped... I think that wasn't even needed.
add a comment |
The information contained in the above question AND first (and only ATT) answer, helped me resolve *a similar * issue of mine on WSL Ubuntu (on Win10 64)!
In my case the executable couldn't find a library.
I ultimately noticed that the newly-made library got positioned in /usr/lib64 , but the multi-arch lines of /etc/ld.so.conf.d/x86_64-linux-gnu.conf did not include that directory.
So I ran
sudo ldconfig /usr/lib64
and that finally fixed it. (running it alone without the directory parameter did not make it 'magically' find the libraries BTW.)
It's unclear whether 'restarting' my WSL bash helped... I think that wasn't even needed.
The information contained in the above question AND first (and only ATT) answer, helped me resolve *a similar * issue of mine on WSL Ubuntu (on Win10 64)!
In my case the executable couldn't find a library.
I ultimately noticed that the newly-made library got positioned in /usr/lib64 , but the multi-arch lines of /etc/ld.so.conf.d/x86_64-linux-gnu.conf did not include that directory.
So I ran
sudo ldconfig /usr/lib64
and that finally fixed it. (running it alone without the directory parameter did not make it 'magically' find the libraries BTW.)
It's unclear whether 'restarting' my WSL bash helped... I think that wasn't even needed.
answered Dec 19 '18 at 19:49
Jordan GeeJordan Gee
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f350068%2fwhere-does-ubuntu-look-for-shared-libraries%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I think those places are defined in
/etc/ld.so.conf.d/*.conf, but I'm not sure of it.– Salem
Sep 25 '13 at 21:18
Seems like it, but see my update to the OQ for the contents of those files... So it looks like it should find
/usr/local/lib/libthrift-0.9.0.sobut still it gives the errorerror while loading shared libraries: libthrift-0.9.0.so: cannot open shared object file: No such file or directory... Is there any reason it would not pick up a directory from/etc/ld.so.conf.d/*.conf?– Dave Lillethun
Sep 25 '13 at 21:32
3
Try to run
sudo ldconfig -vas suggested below. If it still does not work update your question with the output ofldd /path/to/your/application.– Salem
Sep 25 '13 at 21:45