config-ldso.xml 1.4 KB

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