source: chapter05/bash-inst.xml@ e4b9338

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 12.2 12.2-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/loongarch-12.2 xry111/mips64el xry111/multilib xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since e4b9338 was e4b9338, checked in by Gerard Beekmans <gerard@…>, 22 years ago

fix typo's

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

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