source: chapter05/bash-inst.xml@ 78ec17a2

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.0 6.1 6.1.1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk v4_1 v5_0 v5_1 v5_1_1 xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 78ec17a2 was 78ec17a2, checked in by Gerard Beekmans <gerard@…>, 21 years ago

Rewrote chapter 5-bash into new format

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2304 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 3.8 KB
Line 
1<sect2>
2<title>Installation of Bash</title>
3
4<para>Before you attempt to install Bash, you have to check to make sure
5your distribution has the <filename>/usr/lib/libcurses.a</filename> and
6<filename>/usr/lib/libncurses.a</filename> files. If your host
7distribution is an LFS system, all files will be present if you followed
8the instructions of the book version you read exactly.</para>
9
10<para>If both of the files are missing, you have to install the Ncurses
11development package. This package is often called something like
12<emphasis>ncurses-dev</emphasis> or <emphasis>ncurses-static</emphasis>. If
13this package is already installed, or you just installed it, check for the
14two files again. Often the <filename>libcurses.a</filename> file is (still)
15missing. If so, create <filename>libcurses.a</filename> as a symlink
16by running the following commands as user <emphasis>root:</emphasis></para>
17
18<para><screen><userinput>ln -s libncurses.a /usr/lib/libcurses.a</userinput></screen></para>
19
20<para>Now we can really start. Prepare Bash to be compiled by running the
21following command:</para>
22
23
24<para><screen><userinput>./configure --enable-static-link \
25&nbsp;&nbsp;&nbsp;&nbsp;--prefix=$LFS/static --with-curses</userinput></screen></para>
26
27<para>The meaning of the configure switches are:</para>
28
29<itemizedlist>
30<listitem><para><userinput>--enable-static-link:</userinput> This option
31caused the <userinput>bash</userinput> program to be statically
32linked.</para></listitem>
33
34<listitem><para><userinput>--prefix=$LFS/static</userinput> This option
35installs all of Bash's files under the $LFS/static directory, which becomes
36the /static directory when chroot'ed or reboot'ed into
37LFS.</para></listitem>
38
39<listitem><para><userinput>--with-curses:</userinput> This option caused
40bash to be linked against the curses library instead of the default termcap
41library which is being phased out and has become obsolete. Note, on most
42all Linux systems, the curses library is provided by the Ncurses
43package (so in truth we link against the ncurses library).</para>
44
45<para>It is not strictly necessary for the static bash to be linked
46against libncurses (it can link against a static termcap for the time
47being just fine because we will reinstall Bash in Chapter 6 anyways,
48where we will use libncurses), but it's a good test to make sure that
49the Ncurses package has been installed properly. If not, you will get in
50trouble later on in this chapter when you install the Texinfo package.
51That package requires ncurses, and termcap can't reliably be used
52there.</para></listitem>
53</itemizedlist>
54
55<para>Now we can continue compiling Bash:</para>
56
57<para><screen><userinput>make</userinput></screen></para>
58
59<para>And finish off the installation by installing Bash:</para>
60
61<para><screen><userinput>make install</userinput></screen></para>
62
63<para>If the <userinput>make install</userinput> phase ends with something
64along the lines of the following:</para>
65
66<blockquote><screen>install-info: unknown option `--dir-file=/mnt/lfs/usr/info/dir'
67usage: install-info [--version] [--help] [--debug] [--maxwidth=nnn]
68 [--section regexp title] [--infodir=xxx] [--align=nnn]
69 [--calign=nnn] [--quiet] [--menuentry=xxx]
70 [--info-dir=xxx]
71 [--keep-old] [--description=xxx] [--test]
72 [--remove] [--] filename
73make[1]: *** [install] Error 1
74make[1]: Leaving directory `/mnt/lfs/usr/src/bash-&bash-version;/doc'
75make: [install] Error 2 (ignored)</screen></blockquote>
76
77<para>then that means that you are probably using Debian-2.2 (potato), and
78that you have an old version of the texinfo package and the info pages
79can't be installed at this time. This error is not a problem as the info
80pages will be installed when we recompile bash dynamically in Chapter 6, so
81you can ignore it. It is reported that the current release of Debian
82(3.0; also known as Woody) doesn't have this problem.</para>
83
84</sect2>
85
Note: See TracBrowser for help on using the repository browser.