Index: chapter06/kmod.xml
===================================================================
--- chapter06/kmod.xml	(revision 9132fe499be0b137bc5494d39cb89390ea11f4ca)
+++ chapter06/kmod.xml	(revision a326b1d77c3bb9f9f6368c4d0c0346e03aa76ff9)
@@ -96,8 +96,5 @@
 
 <screen><userinput remap="install">mv -v /usr/lib/libkmod.so.* /lib
-ln -svf ../../lib/libkmod.so.2.2.5 /usr/lib/libkmod.so</userinput></screen>
-
-<!-- Note to editors:  When upgrading kmod, make sure the library version
-     specified above has not changed -->
+ln -svf ../../lib/$(readlink /usr/lib/libkmod.so) /usr/lib/libkmod.so</userinput></screen>
 
   </sect2>
Index: chapter06/ncurses.xml
===================================================================
--- chapter06/ncurses.xml	(revision 9132fe499be0b137bc5494d39cb89390ea11f4ca)
+++ chapter06/ncurses.xml	(revision a326b1d77c3bb9f9f6368c4d0c0346e03aa76ff9)
@@ -111,5 +111,5 @@
     a non-existent file. Recreate it:</para>
 
-<screen><userinput remap="install">ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so</userinput></screen>
+<screen><userinput remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so</userinput></screen>
 
     <para>Many applications still expect the linker to be able to find
Index: chapter06/procps.xml
===================================================================
--- chapter06/procps.xml	(revision 9132fe499be0b137bc5494d39cb89390ea11f4ca)
+++ chapter06/procps.xml	(revision a326b1d77c3bb9f9f6368c4d0c0346e03aa76ff9)
@@ -83,7 +83,5 @@
 <screen><userinput remap="install">mv -v /usr/bin/pidof /bin
 mv -v /usr/lib/libprocps.so.* /lib
-ln -sfv ../../lib/libprocps.so.3.0.0 /usr/lib/libprocps.so</userinput></screen>
-
-<!-- Note to devs: check the library version for new releases -->
+ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</userinput></screen>
 
   </sect2>
Index: chapter06/readline.xml
===================================================================
--- chapter06/readline.xml	(revision 9132fe499be0b137bc5494d39cb89390ea11f4ca)
+++ chapter06/readline.xml	(revision a326b1d77c3bb9f9f6368c4d0c0346e03aa76ff9)
@@ -56,5 +56,5 @@
     <para>Prepare Readline for compilation:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr --libdir=/lib</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
 
     <para>Compile the package:</para>
@@ -82,15 +82,10 @@
 <screen><userinput remap="install">make install</userinput></screen>
 
-    <para>Now move the static libraries to a more appropriate location:</para>
+    <para>Now move the dynamic libraries to a more appropriate location
+    and fix up some symbolic links:</para>
 
-<screen><userinput remap="install">mv -v /lib/lib{readline,history}.a /usr/lib</userinput></screen>
-
-    <para>Next, remove the <filename class="extension">.so</filename> files in
-    <filename class="directory">/lib</filename> and relink them into <filename
-    class="directory">/usr/lib</filename>:</para>
-
-<screen><userinput remap="install">rm -v /lib/lib{readline,history}.so
-ln -sfv ../../lib/libreadline.so.6 /usr/lib/libreadline.so
-ln -sfv ../../lib/libhistory.so.6 /usr/lib/libhistory.so</userinput></screen>
+<screen><userinput remap="install">mv -v /usr/lib/lib{readline,history}.so.* /lib
+ln -sfv ../../lib/$(readlink /usr/lib/libreadline.so) /usr/lib/libreadline.so
+ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so</userinput></screen>
 
     <para>If desired, install the documentation:</para>
Index: chapter06/xz.xml
===================================================================
--- chapter06/xz.xml	(revision 9132fe499be0b137bc5494d39cb89390ea11f4ca)
+++ chapter06/xz.xml	(revision a326b1d77c3bb9f9f6368c4d0c0346e03aa76ff9)
@@ -64,5 +64,5 @@
 mv -v   /usr/bin/{unlzma,unxz,xzcat,lzma,xz} /bin
 mv -v /usr/lib/liblzma.so.* /lib
-ln -svf ../../lib/liblzma.so.&xz-version; /usr/lib/liblzma.so</userinput></screen>
+ln -svf ../../lib/$(readlink liblzma.so) /usr/lib/liblzma.so</userinput></screen>
 
   </sect2>
Index: chapter06/zlib.xml
===================================================================
--- chapter06/zlib.xml	(revision 9132fe499be0b137bc5494d39cb89390ea11f4ca)
+++ chapter06/zlib.xml	(revision a326b1d77c3bb9f9f6368c4d0c0346e03aa76ff9)
@@ -64,5 +64,5 @@
 
 <screen><userinput remap="install">mv -v /usr/lib/libz.so.* /lib
-ln -sfv ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
+ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so</userinput></screen>
 
   </sect2>
