| 12345678910111213141516171819202122232425262728293031323334353637 | <sect2><title>Configuring Dynamic Loader</title><para>By default, the dynamic loader(<filename>/lib/ld-linux.so.2</filename>) searches through <filenameclass="directory">/lib</filename> and <filenameclass="directory">/usr/lib</filename> for dynamic libraries that are neededby programs when you run them. However, if there are libraries indirectories other than <filename class="directory">/lib</filename> and<filename class="directory">/usr/lib</filename>, you need to add them tothe <filename>/etc/ld.so.conf</filename> file in order for the dynamicloader to find them. Two directories that are commonly known to containadditional libraries are <filenameclass="directory">/usr/local/lib</filename> and <filenameclass="directory">/opt/lib</filename>, so we add those directories to thedynamic loader's search path.</para><para>Create a new file <filename>/etc/ld.so.conf</filename> by running thefollowing:</para><para><screen><userinput>cat > /etc/ld.so.conf << "EOF"</userinput># Begin /etc/ld.so.conf/usr/local/lib/opt/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 youdon't have to remember the default search paths if you don't want to.</para></sect2>
 |