123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
- ]>
- <sect1 id="ch-system-zlib" role="wrap">
- <?dbhtml filename="zlib.html"?>
- <sect1info condition="script">
- <productname>zlib</productname>
- <productnumber>&zlib-version;</productnumber>
- <address>&zlib-url;</address>
- </sect1info>
- <title>Zlib-&zlib-version;</title>
- <indexterm zone="ch-system-zlib">
- <primary sortas="a-Zlib">Zlib</primary>
- </indexterm>
- <sect2 role="package">
- <title/>
- <para>Zlib 软件包包含一些程序使用的压缩和解压缩子程序。</para>
- <segmentedlist>
- <segtitle>&buildtime;</segtitle>
- <segtitle>&diskspace;</segtitle>
- <seglistitem>
- <seg>&zlib-ch6-sbu;</seg>
- <seg>&zlib-ch6-du;</seg>
- </seglistitem>
- </segmentedlist>
- </sect2>
- <sect2 role="installation">
- <title>安装 Zlib</title>
- <para>准备安装 Zlib:</para>
- <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
- <para>编译该软件包:</para>
- <screen><userinput remap="make">make</userinput></screen>
- <para>运行以下命令以测试编译结果:</para>
- <screen><userinput remap="test">make check</userinput></screen>
- <para>安装该软件包:</para>
- <screen><userinput remap="install">make install</userinput></screen>
- <para>需要把共享库移动到
- <filename class="directory">/lib</filename>,
- 因此还需要重新创建 <filename class="directory">/usr/lib</filename>
- 中的 <filename class="extension">.so</filename> 符号链接:
- </para>
- <note><title>译注</title>
- <para>根据 FHS 的要求,
- <filename class="directory">/bin</filename> 和
- <filename class="directory">/sbin</filename>
- 中程序用到的共享库需要移动到
- <filename class="directory">/lib</filename>。
- 移动共享库的目的是,在无法挂载
- <filename class="directory">/usr</filename>
- (例如磁盘损坏或网络离线)的情况下,
- 仍然能使用最基本的系统功能。如果您没有使用单独的
- <filename class="directory">/usr</filename>
- 文件系统,也不在意 FHS 兼容性,可以跳过移动共享库的步骤。
- 本书和 BLFS 手册中还有其他一些地方需要移动共享库。
- </para>
- </note>
- <screen><userinput remap="install">mv -v /usr/lib/libz.so.* /lib
- ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so</userinput></screen>
- </sect2>
- <sect2 id="contents-zlib" role="content">
- <title>Zlib 的内容</title>
- <segmentedlist>
- <segtitle>安装的库</segtitle>
- <seglistitem>
- <seg>libz.{a,so}</seg>
- </seglistitem>
- </segmentedlist>
- <variablelist>
- <bridgehead renderas="sect3">简要描述</bridgehead>
- <?dbfo list-presentation="list"?>
- <?dbhtml list-presentation="table"?>
- <varlistentry id="libz">
- <term><filename class="libraryfile">libz</filename></term>
- <listitem>
- <para>包含一些程序使用的压缩和解压缩函数</para>
- <indexterm zone="ch-system-zlib libz">
- <primary sortas="c-libz">libz</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- </variablelist>
- </sect2>
- </sect1>
|