diff --git a/chapter08/ncurses.xml b/chapter08/ncurses.xml
index acc3973f1..b13faf234 100644
--- a/chapter08/ncurses.xml
+++ b/chapter08/ncurses.xml
@@ -97,9 +97,23 @@
README file in that directory for further details.
- Install the package:
+
-make install
+ The installation of this package will overwrite
+ libncursesw.so.&ncurses-version;
+ in-place. It may crash the shell process which is using code and data
+ from the library file. Install the package with
+ DESTDIR, and replace the library file correctly using
+ install command. A useless static archive which is
+ not handled by configure is also removed:
+
+make DESTDIR=$PWD/dest install
+install -vm755 dest/usr/lib/libncursesw.so.&ncurses-version; /usr/lib
+rm -v dest/usr/lib/{libncursesw.so.&ncurses-version;,libncurses++w.a}
+cp -av dest/* /
Many applications still expect the linker to be able to find
non-wide-character Ncurses libraries. Trick such applications into linking with
@@ -119,10 +133,6 @@ done
echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so
ln -sfv libncurses.so /usr/lib/libcurses.so
- Remove a static library that is not handled by configure:
-
-rm -fv /usr/lib/libncurses++w.a
-
If desired, install the Ncurses documentation:
mkdir -pv /usr/share/doc/ncurses-&ncurses-version;