ETC/lD. So. conf:
This file records the path of the dynamic link library used during compilation.
By default, the compiler only uses the library files in the/lib and/usr/lib directories.
If you have installed some libraries, for example, when installing GTK +-2.4.13, it will require glib-2.0> = 2.4.0.
-- Prefix =/usr is not specified, so the glib library is installed under/usr/local, and/usr/local/lib is not added to/etc/lD. So. conf.
The path of the library file, such as/usr/lib or/usr/local/lib, should be in the/etc/lD. So. conf file so that LDD can find the library. After checking this, run/sbin/ldconfig as the root user.
Add/usr/local/lib to/etc/lD. So. conf. When GTK is installed, search for/usr/local/lib and find the required library.
Ldconfig:
It is a program, usually located under/sbin, which is used by the root user. The specific functions and usage can be found in man ldconfig.
To put it simply, it caches the library files in the paths listed in/etc/lD. So. conf to/etc/lD. So. cache for use.
Therefore, after installing some library files (such as just installed Glib), or modifying lD. So. conf to add a new library path, run/sbin/ldconfig
Make all the library files cached in LD. So. cache. If it is not done, it will not be used even if the library file is clearly under/usr/lib.
During the compilation process, I encountered an error and lacked the xxx library. I found that the library was clearly there. I wanted to yell at computer pig.