Files
master/chapter05/util-linux.html
2015-05-23 18:50:06 +08:00

173 lines
5.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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=utf-8" />
<title>
5.33.&nbsp;Util-linux-2.26
</title>
<link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
<link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css"
media="print" />
</head>
<body class="lfs" id="lfs-7.7-systemd">
<div class="navheader">
<h4>
Linux From Scratch - Version 7.7-systemd
</h4>
<h3>
第五章 构建临时系统
</h3>
<ul>
<li class="prev">
<a accesskey="p" href="texinfo.html" title="Texinfo-5.2">上一页</a>
<p>
Texinfo-5.2
</p>
</li>
<li class="next">
<a accesskey="n" href="xz.html" title="Xz-5.2.0">下一页</a>
<p>
Xz-5.2.0
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter05.html" title=
"第五章 构建临时系统">返回</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 7.7-systemd">首页</a>
</li>
</ul>
</div>
<div class="wrap" lang="en" xml:lang="en">
<h1 class="sect1">
<a id="ch-tools-util-linux" name="ch-tools-util-linux"></a>5.33.
Util-linux-2.26
</h1>
<div class="package" lang="en" xml:lang="en">
<p>
Util-linux软件包包含了各种各样的小工具。
</p>
<div class="segmentedlist">
<div class="seglistitem">
<div class="seg">
<strong class="segtitle">估计构建时间:</strong>
<span class="segbody">0.6 SBU</span>
</div>
<div class="seg">
<strong class="segtitle">所需磁盘空间:</strong>
<span class="segbody">139 MB</span>
</div>
</div>
</div>
</div>
<div class="installation" lang="en" xml:lang="en">
<h2 class="sect2">
5.33.1. 安装Util-linux
</h2>
<p>
配置Util-linux准备编译
</p>
<pre class="userinput">
<kbd class="command">./configure --prefix=/tools \
--without-python \
--disable-makeinstall-chown \
--without-systemdsystemunitdir \
PKG_CONFIG=""</kbd>
</pre>
<div class="variablelist">
<p class="title">
<strong>配置脚本参数的含义:</strong>
</p>
<dl class="variablelist">
<dt>
<span class="term"><em class=
"parameter"><code>--without-python</code></em></span>
</dt>
<dd>
<p>
这个选项会禁止使用宿主系统中可能安装了的<span class="application">Python</span>。这样可以避免构建一些不必要的捆绑应用。
</p>
</dd>
<dt>
<span class="term"><em class=
"parameter"><code>--disable-makeinstall-chown</code></em></span>
</dt>
<dd>
<p>
这个选项会禁止在安装的时候使用<span class="command"><strong>chown</strong></span>命令。这对我们安装到/tools目录没有意义而且可以避免使用root用户安装。
</p>
</dd>
<dt>
<span class="term"><em class=
"parameter"><code>--without-systemdsystemunitdir</code></em></span>
</dt>
<dd>
<p>
对于使用systemd的系统这个软件包会尝试安装systemd特定文件到/tools下一个不存在的目录里。这个选项可以避免这个不必要的动作。
</p>
</dd>
<dt>
<span class="term"><code class=
"envar">PKG_CONFIG=""</code></span>
</dt>
<dd>
<p>
设定这个环境变量可以避免增加一些宿主机上存在却不必要的功能。请注意这里设定环境变量的方式和LFS其他部分放在命令前面的方式不同。在这里是为了展示一下使用configure脚本配置时设定环境变量的另一种方式。
</p>
</dd>
</dl>
</div>
<p>
编译软件包:
</p>
<pre class="userinput">
<kbd class="command">make</kbd>
</pre>
<p>
安装软件包:
</p>
<pre class="userinput">
<kbd class="command">make install</kbd>
</pre>
</div>
</div>
<div class="navfooter">
<div class="book">
<div class="titlepage">
<div class="author">
<span class="firstname">翻译团队:<a href="http://lctt.github.io/" target="_blank">LCTT</a></span>
<span class="surname">译者/校对:<a href="http://github.com/zpl1025" target="_blank">zpl1025</a>/</span>
</div>
</div>
</div>
<ul>
<li class="prev">
<a accesskey="p" href="texinfo.html" title="Texinfo-5.2">上一页</a>
<p>
Texinfo-5.2
</p>
</li>
<li class="next">
<a accesskey="n" href="xz.html" title="Xz-5.2.0">下一页</a>
<p>
Xz-5.2.0
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter05.html" title=
"第五章 构建临时系统">返回</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 7.7-systemd">首页</a>
</li>
</ul>
</div>
</body>
</html>