blob: b1c6b8b43a833a086d1b641bc5e01fe099f7f4c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<sect2>
<title>Configuring Dynamic Loader</title>
<para>By default, the dynamic loader
(<filename>/lib/ld-linux.so.2</filename>) searches through <filename
class="directory">/lib</filename> and <filename
class="directory">/usr/lib</filename> for dynamic libraries that are needed
by programs when you run them. However, if there are libraries in
directories other than <filename class="directory">/lib</filename> and
<filename class="directory">/usr/lib</filename>, you need to add them to
the <filename>/etc/ld.so.conf</filename> file in order for the dynamic
loader to find them. One directory that is very common to contain
additional libraries is <filename
class="directory">/usr/local/lib</filename> so we add that directory to the
dynamic loader's search path.</para>
<para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
following:</para>
<para><screen><userinput>cat > /etc/ld.so.conf << "EOF"</userinput>
# Begin /etc/ld.so.conf
/usr/local/lib
# End /etc/ld.so.conf
<userinput>EOF</userinput></screen></para>
<para>Although it's not necessary to add the
<filename class="directory">/lib</filename> and
<filename class="directory">/usr/lib</filename> directories it doesn't
hurt. This way it can be seen right away what's being searched and a you
don't have to remember the default search paths if you don't want to.</para>
</sect2>
|