config-ldso.xml 1.1 KB

12345678910111213141516171819202122232425262728293031
  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. Two directories that are commonly known to contain
  12. additional libraries are <filename
  13. class="directory">/usr/local/lib</filename> and <filename
  14. class="directory">/opt/lib</filename>, so we add those directories to the
  15. dynamic loader's search path.</para>
  16. <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
  17. following:</para>
  18. <para><screen><userinput>cat &gt; /etc/ld.so.conf &lt;&lt; "EOF"</userinput>
  19. # Begin /etc/ld.so.conf
  20. /usr/local/lib
  21. /opt/lib
  22. # End /etc/ld.so.conf
  23. <userinput>EOF</userinput></screen></para>
  24. </sect2>