Talking about the problem of locating path of dynamic library under Linux ldconfig ld_library_path Pkg_config_path

Source: Internet
Author: User
Tags naming convention

Talking about the problem of locating path of dynamic library under Linux ldconfig ld_library_path Pkg_config_path

Reprinted from: http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=23069658&id=4028681


After learning to a stage, it is necessary to constantly summarize, precipitate, clear zero, and then continue to "road." Recall that when I first contact with Linux, whether it is to use the source package to compile the program, or the program is running and dynamic library of various kind of resentment, in the heart that really called a discomfort. At that time in the head has also made a murmur, why Linux does not become windows, install a software that trouble not to say, even running software is so annoyed? If that's the case, it won't be called Linux. Borrow Millet company CEO Lei June sentence: Millet, for a fever born. I think: Linux, for the truth. Especially for those who like to toss, passionate about the principles behind the technology and realize the details of the people born.

When it comes to problems related to dynamic library lookup paths, it can be divided into two categories:
The first: the problem of not finding a dependency package when compiling a program through source code, and if you happen to have exactly the exact, true, heaven knows to load the dependent library as it is required, it also gives you a mix-up, Commit two, there is a toss not to die, that makes people really angry son do not hit a place, if Linux at this time gravitated, you are not special want to smoke it ya two big mouth;
the second class: It is in the running program, obviously the application needs of the package has been installed properly, When it's time to run, people tell you, "error while loading shared Libraries:libxxx.so.y:cannot open Shared object file:no such file or directory "It doesn't matter how you toss it." At this point, if you want to "withdraw, buddy, Linux too TM Bully, do not take so much fun," then you are wrong, as long as you hold the "good things will happen" and "approach is always more than the problem" of the belief persist, you will be successful. The meaning of the words is a little self-deception, the taste of the spirit of opium in the inside, but it is really such a reason.

The biggest reason for the above two types of problems is that you didn't white out their mechanisms and principles. What you see is a phenomenon, how did the teacher teach us when we learned Marxist philosophical principles? To see the essence through the phenomenon. If you know the principle of the above two applications, then the problem will not be solved naturally. Let's talk about these two issues in one by one, so that we can play a reference role in learning new Linux friends.

Issue 1: Installing the program through source code
Through the source package installation program, the main use of the "three big strides" strategy: Configure, make and make install. The most problematic is in the Configure stage, many beginners because do not know configure so many parameters how to use, so often for the sake of convenience, a simple "./configure" Down, 80% or 90% can be successful, But the problem tends to be on top of the remaining 10%. This allows us to believe once again that the occurrence of a small probability event has a profound impact on things. In the Configure phase of the installation, in order to detect whether the installation installation environment is satisfied, it is usually through a tool called Pkg-config to detect the existence of the dynamic libraries it needs to rely on, which we have already known in the previous blog post. Pkg-config is typically located in the/usr/bin directory and is an executable program. In the Configure phase, it is common to use pkg-config to determine whether a dependent dynamic library exists. Now the question is, how is this tool judged? What is the basis of it? When these two problems are understood, the truth is clear.

Generally when we install a program, if it provides the function of the dynamic library, in the source code will have one or more files ending with a PC, when the completion of the make install after the PC files are copied to ${prefix}/lib/pkgconfig this directory, The prefix here is that we specified by the configuration parameter--prefix in the Configure phase, which is/usr/local, so the PC files will eventually be copied to the/usr/local/lib/pkgconfig directory. Some people may ask, what is the use of these PC files? Let's just open one to look at:
[Email protected] ~]# cat/usr/local/lib/pkgconfig/librtmp.pc
Prefix=/usr/local
Exec_prefix=${prefix}
Libdir=${exec_prefix}/lib
Incdir=${prefix}/include


Name:librtmp
description:rtmp implementation
version:v2.3
Requires:libssl,libcrypto
Url:http ://rtmpdump.mplayerhq.hu
Libs:-l${libdir}-lrtmp-lz
Cflags:-i${incdir}
The main focus of our configure phase is on the two items of Libs and cflags, and if you execute the following two commands at this point, you are fully aware:
[[email protected] ~]# pkg-config--cflags Librtmp
-i/usr/local/include
[[email protected] ~]# pkg-config--libs librtmp
-l/usr/local/lib-lrtmp -lz-lssl-lcrypto
That is, pkg-config the parameters we need to specify in the makefile to compile and link from the manual hard-coded mode to auto-complete, saving a lot of cross-platform portability compatibility issues, Do we have to thank others for their 18 fathers. If we're going to build a package that relies on librtmp this dynamic library, then this check on my system is passed. Of course this is only the first step, the detection is not necessarily compatible, here we only discuss can find the problem of relying on the library, compatibility problem that is not a matter, people want what version you are born to wait is, this has no discussion, the best also don't discuss, fair trade, otherwise the consequences are very serious. Well, what if I can't find a library. The premise is that you really have installed the library it needs, do not think, for only one reason, pkg-config can not find this library corresponding to the PC file. Why can not find it, the reason is two points:
1, Pkg-config searched all the directories it thinks fit did not find the library corresponding to the whereabouts of the PC file;
2, the library does not provide its PC file at the time of publishing.
Here, we seriously "protest, despise + boycott" The second case of the package, but also try to avoid it, a man out of the mix is not tell, certainly not a better place to go. So, there's only one thing left: where is the search path for pkg-config?

Pkg-config older version, by default will go to/usr/lib/pkgconfig,/usr/loca/lib/pkgconfig,/usr/share/pkgconfig and other directories to search for PC files, As far as I know in the 0.23 and later version of the Pkg-config in the source code has no hard-coded components of the default search path, as to the specific version from which I did not pursue, but also hope to have a friend to share. Instead, when you look at Pkg-config's Man Handbook, there's the following passage:

Pkg-config retrieves information about packages from special metadata files. These files is named after the package, with the extension. PC.
By default, Pkg-config looks in the directory prefix/lib/pkgconfig for these files; It'll also look in the colon-separated (on Windows, semicolon-separated) List of directories specified by the Pkg_config _path environment variable.

And this supplement:
Pkg_config_path
A colon-separated (on Windows, semicolon-separated) lists of directories to search for. pc files. The default directory is always being searched after searching the path; The default is Libdir/pkg-config:datadir/pkgconfig where Libdir is the libdir where Pkg-config and DataDir are the DataDir where Pkg-config was installed.


The above mentioned prefix, Libdir and DataDir are set when the Pkg-config is installed, the situation is as follows:
1, if you are installed through the Yum and RPM packages
Prefix=/usr
Libdir=${prefix}/lib=/usr/lib
Datadir=${prefix}/share=/usr/share
2, if you are installed through the source package, and do not specify the value of prefix (the same as 1 specified)
Prefix=/usr/local
Libdir=${prefix}/lib=/usr/local/lib
Datadir=${prefix}/share=/usr/local/share

Pkg-config The default search path when looking up information for the corresponding package is already clear, a bit wrong, not ${libdir}/pkg-config, but should be ${libdir}/pkgconfig and ${datadir}/pkgconfig. If the PC files for your package are not in these two directories, pkg-config must not be found. Now that the reasons have been found, the solution is varied.
Scenario One: We can use the--prefix parameter to specify the installation directory to/USR in the Configure phase when we install our dependent package;
Scenario Two: You can also according to the above, through a name pkg_config_path environment variable to indicate to Pkg-config our own PC file path, but note that the Pkg_config_path specified path priority is relatively high, Pkg-config will search first, then search the default path.
The advantage of the former is that after the installation of software through the source of a lot of trouble, the disadvantage is that the user's own software packages and systems mixed together inconvenient management, so the actual use, the latter with more.

There are two ways to achieve this in the actual operation of scenario two:
1. For cases without root privileges, most of the cases are performed:
Export Pkg_config_path=/your/local/path: $PKG _config_path

Then, there is absolutely no problem when configure.
2, in the user's home directory in the. bash_profile file or the end of the system file/etc/profile add the above line is also available.
At this point, the first case of the dynamic library lookup problem is completely solved. For more details on PC files, you can refer to http://people.freedesktop.org/~dbn/pkg-config-guide.html; a friend who wants to learn more about Pkg-config Tools suggests looking at the man Handbook.

Issue 2: The program is running with LIBXXX.SO.Y = not found
This is the case, in my previous post "Linux system dynamic library and static library that point of the matter" has been mentioned in part, here to add it complete. In that blog post, I used the configuration file or "Ldconfig dynamic library where the path" to solve, but also 99% of the situation of the solution, which is for the root of the user's solution. When running the software without root privileges, Linux also provides us with an environment variable named Ld_library_path to solve the runtime dynamic library lookup path solution. Similarly, the path specified by this environment variable will be/lib/ld-2.12.so by the loader first, then the dynamic library cache file/etc/ld.so.cache, elegant demeanor is ld_library_path to Rob,/etc/ Ld.so.cache said he was unhappy. For LD_LIBRARY_PATH environment variable This situation, is absolutely temporary can no longer temporary solution, if only test, with export like to solve pkg_config_path the same way clean and neat, do not in the actual production on-line operation and maintenance environment in the " Export Ld_library_path= ... " Add to. bash_profile or/etc/profile, or you'll regret your intestines are green.

In fact, Pkg_config_path and Ld_library_path are often misused by many people, especially the novice in solving problems, but also indiscriminately, caught is a crazy export, according to the actual situation, luck may be the problem is really solved, A little back to toss a day and a half stay is also white busy. In fact, if you leave a snack, it is easy to understand:
Pkg_config_path from the literal meaning of translation, is "Package configuration path", this is not very obvious, compile software if there is not found in the dependent dynamic library when it is all rely on pkg_config_path;
Ld_library_path also very straightforward "loader library path", LD is a shorthand for loader, in the blog "section error in the end is where doer" I also mentioned that in the Linux system to start a program is called loading, When a program executes, it relies more or less on dynamic libraries (except statically compiled ones). When you use "LDD executable name" To view a software startup depends on the dynamic library, if the output item has "Libxxx.so.y=> not found" one, you this software 100% can not run up.

Don't believe us to do an experiment:
[Email protected] ~]# echo $LD _library_path//Well, No.

[Email protected] ~]# Ldd/usr/local/bin/ffmpeg
Linux-gate.so.1 = (0x00914000)
libavdevice.so.54 =/usr/local/lib/libavdevice.so.54 (0x007d0000)
Libavfilter.so.3 =/usr/local/lib/libavfilter.so.3 (0x001f3000)
libavformat.so.54 =/usr/local/lib/libavformat.so.54 (0x002b5000)
libavcodec.so.54 =/usr/local/lib/libavcodec.so.54 (0xb68dd000)
libpostproc.so.52 =/usr/local/lib/libpostproc.so.52 (0x0083c000)
libswresample.so.0 =/usr/local/lib/libswresample.so.0 (0x00a91000)
libswscale.so.2 =/usr/local/lib/libswscale.so.2 (0x00d80000)
libavutil.so.52 =/usr/local/lib/libavutil.so.52 (0x001a7000)
libm.so.6 =/lib/libm.so.6 (0x0058b000)
libpthread.so.0 =/lib/libpthread.so.0 (0x001d7000)
libc.so.6 =/lib/libc.so.6 (0x005e2000)
libasound.so.2 =/lib/libasound.so.2 (0x00ec5000)
libdc1394.so.22 =/usr/local/lib/libdc1394.so.22 (0x00116000)
Librt.so.1 =/lib/librt.so.1 (0x00184000)
libfreetype.so =/usr/local/lib/libfreetype.so (0x00411000)
Libass.so.4 =/usr/local/lib/libass.so.4 (0x0091a000)
libssl.so.1.0.0 =/usr/local/lib/libssl.so.1.0.0 (0x0048c000)
libcrypto.so.1.0.0 =/usr/local/lib/libcrypto.so.1.0.0 (0x00aa8000)
librtmp.so.0 =/usr/local/lib/librtmp.so.0 (0x009dd000)
Libz.so.1 =/lib/libz.so.1 (0x0018d000)
libx264.so.132 =/usr/local/lib/libx264.so.132 (0x00fb1000)
libvorbisenc.so.2 =/usr/local/lib/libvorbisenc.so.2 (0x0194d000)
libvorbis.so.0 =/usr/local/lib/libvorbis.so.0 (0x004e5000)
libvo-aacenc.so.0 =/usr/local/lib/libvo-aacenc.so.0 (0x00799000)
libtwolame.so.0 =/usr/local/lib/libtwolame.so.0 (0x0050d000)
Libtheoraenc.so.1 =/usr/local/lib/libtheoraenc.so.1 (0x0052d000)
Libtheoradec.so.1 =/usr/local/lib/libtheoradec.so.1 (0x00779000)
Libspeex.so.1 =/usr/local/lib/libspeex.so.1 (0x00c94000)
libmp3lame.so.0 =/usr/local/lib/libmp3lame.so.0 (0x0088c000)
libfaac.so.0 =/usr/local/lib/libfaac.so.0 (0x00573000)
/lib/ld-linux.so.2 (0x005c2000)
libdl.so.2 =/lib/libdl.so.2 (0x001a1000)
libraw1394.so.11 =/usr/local/lib/libraw1394.so.11 (0x005b5000)
libfribidi.so.0 =/usr/local/lib/libfribidi.so.0 (0x007b5000)
Libfontconfig.so.1 =/usr/local/lib/libfontconfig.so.1 (0x007ea000)
libogg.so.0 =/usr/local/lib/libogg.so.0 (0x00583000)
Libexpat.so.1 =/lib/libexpat.so.1 (0x00933000)
The LD_LIBRARY_PATH environment variable is not set in my system, and the last it compiled FFmpeg runtime relies on a very many dynamic libraries. Now let's move one of the library libmp3lame.so.0 from/usr/loca/lib to the/OPT directory, and execute the ldconfig, and let libmp3lame.so.0 disappear completely from the/etc/ld.so.cache. In fact libmp3lame.so.0 just a symbolic link libmp3lame.so.0.0.0, we really need to move the latter, after the end of the execution of ldd/usr/local/bin/ffmpeg when the result is as follows:

[Email protected] ~]# Ldd/usr/local/bin/ffmpeg
Linux-gate.so.1 = (0x00249000)
libavdevice.so.54 =/usr/local/lib/libavdevice.so.54 (0x00e12000)
Libavfilter.so.3 =/usr/local/lib/libavfilter.so.3 (0x00ccd000)
libavformat.so.54 =/usr/local/lib/libavformat.so.54 (0x00891000)
libavcodec.so.54 =/usr/local/lib/libavcodec.so.54 (0xb6877000)
libpostproc.so.52 =/usr/local/lib/libpostproc.so.52 (0x001a6000)
libswresample.so.0 =/usr/local/lib/libswresample.so.0 (0x00b8f000)
libswscale.so.2 =/usr/local/lib/libswscale.so.2 (0x0024a000)
libavutil.so.52 =/usr/local/lib/libavutil.so.52 (0x005d7000)
libm.so.6 =/lib/libm.so.6 (0x007ad000)
libpthread.so.0 =/lib/libpthread.so.0 (0x001f6000)
libc.so.6 =/lib/libc.so.6 (0x0029f000)
libasound.so.2 =/lib/libasound.so.2 (0x00604000)
libdc1394.so.22 =/usr/local/lib/libdc1394.so.22 (0x00436000)
Librt.so.1 =/lib/librt.so.1 (0x00a06000)
libfreetype.so =/usr/local/lib/libfreetype.so (0x0052d000)
Libass.so.4 =/usr/local/lib/libass.so.4 (0x00211000)
libssl.so.1.0.0 =/usr/local/lib/libssl.so.1.0.0 (0x00eed000)
libcrypto.so.1.0.0 =/usr/local/lib/libcrypto.so.1.0.0 (0x00f46000)
librtmp.so.0 =/usr/local/lib/librtmp.so.0 (0x004b9000)
Libz.so.1 =/lib/libz.so.1 (0x0022a000)
libx264.so.132 =/usr/local/lib/libx264.so.132 (0x0765d000)
libvorbisenc.so.2 =/usr/local/lib/libvorbisenc.so.2 (0x00a0f000)
libvorbis.so.0 =/usr/local/lib/libvorbis.so.0 (0x004ce000)
libvo-aacenc.so.0 =/usr/local/lib/libvo-aacenc.so.0 (0x005a8000)
libtwolame.so.0 =/usr/local/lib/libtwolame.so.0 (0x006f0000)
Libtheoraenc.so.1 =/usr/local/lib/libtheoraenc.so.1 (0x00710000)
Libtheoradec.so.1 =/usr/local/lib/libtheoradec.so.1 (0x00756000)
Libspeex.so.1 =/usr/local/lib/libspeex.so.1 (0x00770000)
libmp3lame.so.0 = not found///Sure enough, it's gone red:)
libfaac.so.0 =/usr/local/lib/libfaac.so.0 (0x004a4000)
/lib/ld-linux.so.2 (0x0050d000)
libdl.so.2 =/lib/libdl.so.2 (0x0023e000)
libraw1394.so.11 =/usr/local/lib/libraw1394.so.11 (0x004f6000)
libfribidi.so.0 =/usr/local/lib/libfribidi.so.0 (0x0078a000)
Libfontconfig.so.1 =/usr/local/lib/libfontconfig.so.1 (0x007d7000)
libogg.so.0 =/usr/local/lib/libogg.so.0 (0x00243000)
Libexpat.so.1 =/lib/libexpat.so.1 (0x00806000)

[Email protected] ~]# ffmpeg--help
Ffmpeg:error while loading shared libraries:libmp3lame.so.0:cannot open Shared object file:no such file or directory/ /At this time ffmpeg of course not run up
Let's try Ld_library_path and see if it works:
[Email protected] opt]# export ld_library_path=/opt: $LD _library_path
[Email protected] opt]#
[Email protected] opt]# Ldd/usr/local/bin/ffmpeg
Linux-gate.so.1 = (0x00136000)
libavdevice.so.54 =/usr/local/lib/libavdevice.so.54 (0x00552000)
Libavfilter.so.3 =/usr/local/lib/libavfilter.so.3 (0x00655000)
libavformat.so.54 =/usr/local/lib/libavformat.so.54 (0x00243000)
libavcodec.so.54 =/usr/local/lib/libavcodec.so.54 (0xb68a7000)
libpostproc.so.52 =/usr/local/lib/libpostproc.so.52 (0x00137000)
libswresample.so.0 =/usr/local/lib/libswresample.so.0 (0x00187000)
libswscale.so.2 =/usr/local/lib/libswscale.so.2 (0x0047e000)
libavutil.so.52 =/usr/local/lib/libavutil.so.52 (0x00a9d000)
libm.so.6 =/lib/libm.so.6 (0x00af9000)
libpthread.so.0 =/lib/libpthread.so.0 (0x00823000)
libc.so.6 =/lib/libc.so.6 (0x0083e000)
libasound.so.2 =/lib/libasound.so.2 (0x0055f000)
libdc1394.so.22 =/usr/local/lib/libdc1394.so.22 (0x0019e000)
Librt.so.1 =/lib/librt.so.1 (0x00b3c000)
libfreetype.so =/usr/local/lib/libfreetype.so (0x0039f000)
Libass.so.4 =/usr/local/lib/libass.so.4 (0x00f67000)
libssl.so.1.0.0 =/usr/local/lib/libssl.so.1.0.0 (0x00cb3000)
libcrypto.so.1.0.0 =/usr/local/lib/libcrypto.so.1.0.0 (0x00d0c000)
librtmp.so.0 =/usr/local/lib/librtmp.so.0 (0x0020c000)
Libz.so.1 =/lib/libz.so.1 (0x00c77000)
libx264.so.132 =/usr/local/lib/libx264.so.132 (0x00f80000)
libvorbisenc.so.2 =/usr/local/lib/libvorbisenc.so.2 (0x07c66000)
libvorbis.so.0 =/usr/local/lib/libvorbis.so.0 (0x0041a000)
libvo-aacenc.so.0 =/usr/local/lib/libvo-aacenc.so.0 (0x0076c000)
libtwolame.so.0 =/usr/local/lib/libtwolame.so.0 (0x004fe000)
Libtheoraenc.so.1 =/usr/local/lib/libtheoraenc.so.1 (0x00717000)
Libtheoradec.so.1 =/usr/local/lib/libtheoradec.so.1 (0x00f0c000)
Libspeex.so.1 =/usr/local/lib/libspeex.so.1 (0x00221000)
libmp3lame.so.0 = not found//Nani?!!!!
libfaac.so.0 =/usr/local/lib/libfaac.so.0 (0x00124000)
/lib/ld-linux.so.2 (0x00bad000)
libdl.so.2 =/lib/libdl.so.2 (0x0023b000)
libraw1394.so.11 =/usr/local/lib/libraw1394.so.11 (0x007b6000)
libfribidi.so.0 =/usr/local/lib/libfribidi.so.0 (0x00442000)
Libfontconfig.so.1 =/usr/local/lib/libfontconfig.so.1 (0x0051e000)
libogg.so.0 =/usr/local/lib/libogg.so.0 (0x009f7000)
Libexpat.so.1 =/lib/libexpat.so.1 (0x00b60000)
Remember the above mentioned soft link, libmp3lame.so.0 is libmp3lame.so.0.0.0 soft link, this is a dynamic library naming convention, we just create a/opt/directory named libmp3lame.so.0 to/opt /libmp3lame.so.0.0.0 's soft link is ok:

[[email protected] opt]# ls
libmp3lame.so.0.0.0
[Email protected] opt]# ln-s libmp3lame.so.0.0.0 libmp3lame.so.0
[email protected] opt]# LL
Total 316
lrwxrwxrwx. 1 root root 7 23:27 libmp3lame.so.0-libmp3lame.so.0.0.0
-rwxr-xr-x. 1 root root 321228 Dec 7 23:25 libmp3lame.so.0.0.0
[Email protected] opt]# Ldd/usr/local/bin/ffmpeg
Linux-gate.so.1 = (0x00cc4000)
libavdevice.so.54 =/usr/local/lib/libavdevice.so.54 (0x00577000)
Libavfilter.so.3 =/usr/local/lib/libavfilter.so.3 (0x00e3f000)
libavformat.so.54 =/usr/local/lib/libavformat.so.54 (0x00202000)
libavcodec.so.54 =/usr/local/lib/libavcodec.so.54 (0x00f01000)
libpostproc.so.52 =/usr/local/lib/libpostproc.so.52 (0x00170000)
libswresample.so.0 =/usr/local/lib/libswresample.so.0 (0x00750000)
libswscale.so.2 =/usr/local/lib/libswscale.so.2 (0x0035e000)
libavutil.so.52 =/usr/local/lib/libavutil.so.52 (0x005ba000)
libm.so.6 =/lib/libm.so.6 (0x00452000)
libpthread.so.0 =/lib/libpthread.so.0 (0x001c0000)
libc.so.6 =/lib/libc.so.6 (0x008c2000)
libasound.so.2 =/lib/libasound.so.2 (0x0047c000)
libdc1394.so.22 =/usr/local/lib/libdc1394.so.22 (0x003d6000)
Librt.so.1 =/lib/librt.so.1 (0x00db3000)
libfreetype.so =/usr/local/lib/libfreetype.so (0x00a80000)
Libass.so.4 =/usr/local/lib/libass.so.4 (0x001db000)
libssl.so.1.0.0 =/usr/local/lib/libssl.so.1.0.0 (0x005e7000)
libcrypto.so.1.0.0 =/usr/local/lib/libcrypto.so.1.0.0 (0x00afb000)
librtmp.so.0 =/usr/local/lib/librtmp.so.0 (0x00584000)
Libz.so.1 =/lib/libz.so.1 (0x00599000)
libx264.so.132 =/usr/local/lib/libx264.so.132 (0x02bc9000)
libvorbisenc.so.2 =/usr/local/lib/libvorbisenc.so.2 (0x05ccd000)
libvorbis.so.0 =/usr/local/lib/libvorbis.so.0 (0x00640000)
libvo-aacenc.so.0 =/usr/local/lib/libvo-aacenc.so.0 (0x00834000)
libtwolame.so.0 =/usr/local/lib/libtwolame.so.0 (0x00668000)
Libtheoraenc.so.1 =/usr/local/lib/libtheoraenc.so.1 (0x00688000)
Libtheoradec.so.1 =/usr/local/lib/libtheoradec.so.1 (0x006ce000)
Libspeex.so.1 =/usr/local/lib/libspeex.so.1 (0x00815000)
libmp3lame.so.0 =/opt/libmp3lame.so.0 (0x00767000)//finally completed:)
libfaac.so.0 =/usr/local/lib/libfaac.so.0 (0x006e8000)
/lib/ld-linux.so.2 (0x003b6000)
libdl.so.2 =/lib/libdl.so.2 (0x001f4000)
libraw1394.so.11 =/usr/local/lib/libraw1394.so.11 (0x00444000)
libfribidi.so.0 =/usr/local/lib/libfribidi.so.0 (0x006f8000)
Libfontconfig.so.1 =/usr/local/lib/libfontconfig.so.1 (0x00710000)
libogg.so.0 =/usr/local/lib/libogg.so.0 (0x001f9000)
Libexpat.so.1 =/lib/libexpat.so.1 (0x007e3000)


So, for the dynamic library path to find a variety of problems, nothing but so two categories, the key is to find the right reason, the remedy, can charm.

Talking about the problem of locating path of dynamic library under Linux ldconfig ld_library_path Pkg_config_path

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.