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

📄 creatingtoolsdir.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>
      4.2.&nbsp;Creating the $LFS/tools Directory
    </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;4.&nbsp;最后的准备工作
        </h3>
      </div>
      <ul class="headerlinks">
        <li class="prev">
          <a accesskey="p" href="chapter04.html" title="Final Preparations">后退</a>
          <p>
            Final Preparations
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="addinguser.html" title="Adding the LFS User">前进</a>
          <p>
            Adding the LFS User
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter04.html" title="Chapter&nbsp;4.&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="sect1" lang="zh_cn" xml:lang="zh_cn">
      <div class="titlepage">
        <h1 class="sect1">
          4.2. 创建 $LFS/tools 目录
        </h1>
      </div>
      <p>
        <a href="../chapter05/chapter05.html">Chapter 5</a>编译的所有程序都将安装到
        <tt class="filename">$LFS/tools</tt> 目录下,以便与 <a href="../chapter06/chapter06.html">Chapter
        6</a> 编译的程序隔离开来。在这里编译的程序是临时用的工具,不是最终 LFS 系统的组成部分。把这些程序放到一个单独的目录下,在使用过之后简单的删除掉就可以了。这样做也可以防止这些程序与宿主系统同样程序的目录混淆 (<a href="../chapter05/chapter05.html">Chapter 5</a>中容易出现这样的事情)。
      </p>
      <p>
        以<span class="emphasis"><em>root</em></span>用户运行下面的命令来创建所需的目录:
      </p>
      <pre class="userinput"><kbd class="command">mkdir $LFS/tools</kbd></pre>
      <p>
        下一步是在宿主系统创建 <tt class="filename">/tools</tt> 符号链接,指向 LFS 分区上新创建的目录,同样作为 <span class="emphasis"><em>root</em></span> 用户运行这个命令:
      </p>
      <pre class="userinput"><kbd class="command">ln -s $LFS/tools /</kbd></pre>
      <div class="note">
        <div class="admonhead">
          <img alt="[Note]" src="../images/note.png" />
          <h3 class="admontitle">
            注意
          </h3>
        </div>
        <div class="admonbody">
          <p>
            这个命令是正确的,<span><strong class="command">ln</strong></span>命令有一点语法上的变化。如果您认为发现了一个错误,在报告它之前,先用以下 <span><strong class="command">info coreutils ln</strong></span> 和 <tt class="filename">ln(1)</tt> 命令查看说明手册。
          </p>
        </div>
      </div>
      <p>
        所创建的符号链接使得编译的工具链总是在 <tt class="filename">/tools</tt>目录,这意味着编译器、汇编器和连接器在本章(这时我们还在使用宿主系统的一些工具)和下一章(这时我们“chrooted”到了 LFS 分区)都可以使用。
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="chapter04.html" title="Final Preparations">后退</a>
          <p>
            Final Preparations
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="addinguser.html" title="Adding the LFS User">前进</a>
          <p>
            Adding the LFS User
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter04.html" title="Chapter&nbsp;4.&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 + -