⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bash.html

📁 Linux From Scratch的中文指导,学习LINUX很有用
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=gb2312" />
    <title>
      5.27.&nbsp;Bash-3.0
    </title>
    <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.68.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css" media="print" />
  </head>
  <body id="lfs" class="6.1">
    <div class="navheader">
      <div class="headertitles">
        <h4>
          Linux From Scratch - Version 6.1
        </h4>
        <h3>
          Chapter&nbsp;5.&nbsp;构建临时编译环境
        </h3>
      </div>
      <ul class="headerlinks">
        <li class="prev">
          <a accesskey="p" href="texinfo.html" title="Texinfo-4.8">后退</a>
          <p>
            Texinfo-4.8
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="m4.html" title="M4-1.4.3">前进</a>
          <p>
            M4-1.4.3
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter05.html" title="Chapter&nbsp;5.&nbsp;构建临时编译环境">上一级</a>.
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title="Linux From Scratch - Version 6.1">回首页</a>
        </li>
      </ul>
    </div>
    <div class="wrap" lang="zh_cn" xml:lang="zh_cn">
      <div class="titlepage">
        <h1 class="sect1">
          5.27. Bash-3.0
        </h1>
      </div>
      <div class="package" lang="zh_cn" xml:lang="zh_cn">
        <p>Bash 是 Bourne-Again Shell 的缩写,它在UNIX系统中作为 shell 被广泛使用。 
        </p>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong><span class="segtitle">预计编译时间:</span></strong> <span class="seg">1.2 SBU</span>
            </div>
            <div class="seg">
              <strong><span class="segtitle">所需磁盘空间:</span></strong> <span class="seg">20.7 MB</span>
            </div>
          </div>
        </div>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong><span class="segtitle">安装依赖于:</span></strong> <span class="seg">Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Ncurses, Sed.</span>
            </div>
          </div>
        </div>
      </div>
      <div class="installation" lang="zh_cn" xml:lang="zh_cn">
        <div class="titlepage">
          <h2 class="sect2">
            5.27.1. 安装 Bash
          </h2>
        </div>
        <p>在使用较新版本的 Glibc 编译 Bash 会导致系统不恰当挂起的问题,下面这个补丁可以修正它:
        </p>
        <pre class="userinput"><kbd class="command">patch -Np1 -i ../bash-3.0-avoid_WCONTINUED-1.patch</kbd></pre>
        <p>准备编译 Bash:
        </p>
        <pre class="userinput"><kbd class="command">./configure --prefix=/tools --without-bash-malloc</kbd></pre>
        <p>
          配置选项的含义:
        </p>
        <div class="variablelist">
          <dl>
            <dt>
              <span class="term"><em class="parameter"><tt>--without-bash-malloc</tt></em></span>
            </dt>
            <dd>
              <p>这个选项禁用了 Bash 的内存分配函数(malloc),这个函数已知会造成段错误,通过设置这个选项,Bash 将使用更为稳定的 Glibc 里的 malloc 函数。
              </p>
            </dd>
          </dl>
        </div>
        <p>编译软件包:</p>
        <pre class="userinput"><kbd class="command">make</kbd></pre>
        <p>
          要测试结果,请运行: <strong class="userinput"><tt>make
          tests</tt></strong>
        </p>
        <p>
         安装软件包:
        </p>
        <pre class="userinput"><kbd class="command">make install</kbd></pre>
        <p>为那些用 <span><strong class="command">sh</strong></span> 作为 shell 的程序创建符号链接:
        </p>
        <pre class="userinput"><kbd class="command">ln -s bash /tools/bin/sh</kbd></pre>
      </div>
      <div class="content" lang="zh_cn" xml:lang="zh_cn">
        <p>关于这个软件包的详细资料位于 <a href="../chapter06/bash.html#contents-bash" title="6.37.2.&nbsp;Contents of Bash">Section&nbsp;6.37.2, &ldquo;Contents of Bash.&rdquo;</a>
        </p>
      </div>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="texinfo.html" title="Texinfo-4.8">后退</a>
          <p>
            Texinfo-4.8
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="m4.html" title="M4-1.4.3">前进</a>
          <p>
            M4-1.4.3
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter05.html" title="Chapter&nbsp;5.&nbsp;构建临时编译环境">上一级</a>.
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title="Linux From Scratch - Version 6.1">回首页</a>.
        </li>
      </ul>
    </div>
  </body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -