# C. 依赖关系
Every package built in LFS relies on one or more other packages in order to build and install properly. Some packages even participate in circular dependencies, that is, the first package depends on the second which in turn depends on the first. Because of these dependencies, the order in which packages are built in LFS is very important. The purpose of this page is to document the dependencies of each package built in LFS.
For each package we build, we have listed three types of dependencies. The first lists what other packages need to be available in order to compile and install the package in question. The second lists what packages, in addition to those on the first list, need to be available in order to run the testsuites. The last list of dependencies are packages that require this package to be built and installed in its final location before they are built and installed. In most cases, this is because these packages will hardcode paths to binaries within their scripts. If not built in a certain order, this could result in paths of /tools/bin/[binary] being placed inside scripts installed to the final system. This is obviously not desirable.
## Autoconf
**Installation depends on:** Bash, Coreutils, Grep, M4, Make, Perl, Sed, Texinfo**Test suite depends on:** Automake, Diffutils, Findutils, GCC, Libtool**Must be installed before:** Automake
## Automake
**Installation depends on:** Autoconf, Bash, Coreutils, Gettext, Grep, M4, Make, Perl, Sed, Texinfo**Test suite depends on:** Binutils, Bison, Bzip2, DejaGNU, Diffutils, Expect, Findutils, Flex, GCC, Gettext, Gzip, Libtool, Tar. Can also use several other packages that are not installed in LFS.**Must be installed before:** None
## Bash
**Installation depends on:** Bash, Bison, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Ncurses, Patch, Readline, Sed, Texinfo**Test suite depends on:** Diffutils, Gawk**Must be installed before:** None
## Berkeley DB
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Sed**Test suite depends on:** Not run. Requires TCL installed on the final system**Must be installed before:** None
## Binutils
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Perl, Sed, Texinfo**Test suite depends on:** DejaGNU, Expect**Must be installed before:** None
## Bison
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, M4, Make, Sed**Test suite depends on:** Diffutils and Findutils**Must be installed before:** Flex, Kbd, Tar
## Bzip2
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Make, Patch**Test suite depends on:** None**Must be installed before:** None
## Coreutils
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make, Patch, Perl, Sed, Texinfo**Test suite depends on:** Diffutils**Must be installed before:** Bash, Diffutils, Findutils, Man-DB, Udev
## DejaGNU
**Installation depends on:** Bash, Coreutils, Diffutils, GCC, Grep, Make, Sed**Test suite depends on:** No testsuite available**Must be installed before:** None
## Diffutils
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Patch, Sed, Texinfo**Test suite depends on:** No testsuite available**Must be installed before:** None
## Expect
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Patch, Sed, Tcl**Test suite depends on:** None**Must be installed before:** None
## E2fsprogs
**Installation depends on:** Bash, Binutils, Coreutils, Gawk, GCC, Gettext, Glibc, Grep, Gzip, Make, Sed, Texinfo**Test suite depends on:** Diffutils**Must be installed before:** Util-Linux
## File
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Sed, Zlib**Test suite depends on:** No testsuite available**Must be installed before:** None
## Findutils
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make, Sed, Texinfo**Test suite depends on:** DejaGNU, Diffutils, Expect**Must be installed before:** None
## Flex
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, M4, Make, Patch, Sed, Texinfo**Test suite depends on:** Bison, Gawk**Must be installed before:** IPRoute2, Kbd, Man-DB
## Gawk
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make, Patch, Sed and, Texinfo**Test suite depends on:** Diffutils**Must be installed before:** None
## Gcc
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, GCC, Gettext, Glibc, Grep, Make, Patch, Perl, Sed, Tar, Texinfo**Test suite depends on:** DejaGNU, Expect**Must be installed before:** None
## Gettext
**Installation depends on:** Bash, Binutils, Coreutils, Gawk, GCC, Glibc, Grep, Make, Sed, Texinfo**Test suite depends on:** Diffutils, Perl, Tcl**Must be installed before:** Automake
## Glibc
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Gettext, Grep, Gzip, Make, Perl, Sed, Texinfo**Test suite depends on:** None**Must be installed before:** None
## Grep
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Make, Patch, Sed, Texinfo**Test suite depends on:** Diffutils, Gawk**Must be installed before:** Man-DB
## Groff
**Installation depends on:** Bash, Binutils, Bison, Coreutils, Gawk, GCC, Glibc, Grep, Make, Patch, Sed, Texinfo**Test suite depends on:** No testsuite available**Must be installed before:** Man-DB, Perl
## GRUB
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Ncurses, Sed, Texinfo**Test suite depends on:** None**Must be installed before:** None
## Gzip
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Patch, Sed, Texinfo**Test suite depends on:** No testsuite available**Must be installed before:** Man-DB
## Iana-Etc
**Installation depends on:** Coreutils, Gawk, Make**Test suite depends on:** No testsuite available**Must be installed before:** Perl
## Inetutils
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Ncurses, Patch, Sed, Texinfo**Test suite depends on:** No testsuite available**Must be installed before:** Tar
## IProute2
**Installation depends on:** Bash, Berkeley DB, Bison, Coreutils, Flex, GCC, Glibc, Make, Linux-Libc-Headers**Test suite depends on:** No testsuite available**Must be installed before:** None
## Kbd
**Installation depends on:** Bash, Binutils, Bison, Coreutils, Flex, GCC, Gettext, Glibc, Gzip, Make, Patch, Sed**Test suite depends on:** No testsuite available**Must be installed before:** None
## Less
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Ncurses, Sed**Test suite depends on:** No testsuite available**Must be installed before:** None
## Libtool
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Sed, Texinfo**Test suite depends on:** Findutils**Must be installed before:** None
## Linux Kernel
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, Findutils, GCC, Glibc, Grep, Gzip, Make, Module-Init-Tools, Ncurses, Sed**Test suite depends on:** No testsuite available**Must be installed before:** None
## M4
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Sed**Test suite depends on:** Diffutils**Must be installed before:** Autoconf and Bison
## Man-DB
**Installation depends on:** Bash, Berkeley DB, Binutils, Bzip2, Coreutils, Flex, GCC, Gettext, Glibc, Grep, Groff, Gzip, Less, Make, Sed**Test suite depends on:** Not run. Requires Man-DB testsuite package**Must be installed before:** None
## Make
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Sed, Texinfo**Test suite depends on:** Perl**Must be installed before:** None
## Mktemp
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Glibc, Grep, Patch, Sed**Test suite depends on:** No testsuite available**Must be installed before:** None
## Module-Init-Tools
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Sed, Zlib**Test suite depends on:** File, Findutils, Gawk**Must be installed before:** None
## Ncurses
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Patch, Sed**Test suite depends on:** No testsuite available**Must be installed before:** Bash, GRUB, Inetutils, Less, Procps, Psmisc, Readline, Texinfo, Util-Linux, Vim
## Patch
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Sed**Test suite depends on:** No testsuite available**Must be installed before:** None
## Perl
**Installation depends on:** Bash, Berkeley DB, Binutils, Coreutils, Gawk, GCC, Glibc, Grep, Groff, Make, Sed**Test suite depends on:** Iana-Etc, Procps**Must be installed before:** Autoconf
## Procps
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Glibc, Make, Ncurses**Test suite depends on:** No testsuite available**Must be installed before:** None
## Psmisc
**Installation depends on:** Bash, Coreutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, Sed**Test suite depends on:** No testsuite available**Must be installed before:** None
## Readline
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Ncurses, Patch, Sed, Texinfo**Test suite depends on:** No testsuite available**Must be installed before:** Bash
## Sed
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make, Sed, Texinfo**Test suite depends on:** Diffutils, Gawk**Must be installed before:** E2fsprogs, File, Libtool, Shadow
## Shadow
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, GCC, Gettext, Glibc, Grep, Make, Sed**Test suite depends on:** No testsuite available**Must be installed before:** None
## Sysklogd
**Installation depends on:** Binutils, Coreutils, GCC, Glibc, Make, Patch**Test suite depends on:** No testsuite available**Must be installed before:** None
## Sysvinit
**Installation depends on:** Binutils, Coreutils, GCC, Glibc, Make, Sed**Test suite depends on:** No testsuite available**Must be installed before:** None
## Tar
**Installation depends on:** Bash, Binutils, Bison, Coreutils, GCC, Gettext, Glibc, Grep, Inetutils, Make, Patch, Sed, Texinfo**Test suite depends on:** Diffutils, Findutils, Gawk**Must be installed before:** None
## Tcl
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Sed**Test suite depends on:** None**Must be installed before:** None
## Texinfo
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, Patch, Sed**Test suite depends on:** None**Must be installed before:** None
## Udev
**Installation depends on:** Binutils, Coreutils, GCC, Glibc, Make**Test suite depends on:** Findutils, Perl, Sed**Must be installed before:** None
## Util-Linux
**Installation depends on:** Bash, Binutils, Coreutils, E2fprogs, GCC, Gettext, Glibc, Grep, Make, Ncurses, Patch, Sed, Zlib**Test suite depends on:** No testsuite available**Must be installed before:** None
## Vim
**Installation depends on:** Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Ncurses, Sed**Test suite depends on:** None**Must be installed before:** None
## Zlib
**Installation depends on:** Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Sed**Test suite depends on:** None**Must be installed before:** File, Module-Init-Tools, Util-Linux
- Linux From Scratch
- 序言
- i. 前言
- ii. 目标读者
- iii. 先决条件
- iv. 对宿主系统的要求
- v. 排版约定
- vi. 本书的组织结构
- vii. 勘误表
- I. 简介
- 1. 简介
- 1.1. 如何构建一个 LFS 系统?
- 1.2. 与上一版本有何不同?
- 1.3. 更新日志
- 1.4. 资源
- 1.5. 帮助
- 2. 准备一个新分区
- 2.1. 简介
- 2.2. 创建一个新分区
- 2.3. 在新分区上创建文件系统
- 2.4. 挂载新分区
- 3. 软件包和补丁
- 3.1. 简介
- 3.2. 全部软件包
- 3.3. 需要的补丁
- 4. 最后的准备工作
- 4.1. 关于环境变量 $LFS
- 4.2. 创建 $LFS/tools 目录
- 4.3. 添加 LFS 用户
- 4.4. 设置工作环境
- 4.5. 关于 SBU
- 4.6. 关于软件包测试套件
- 5. 构建临时编译环境
- 5.1. 简介
- 5.2. 工具链技术说明
- 5.3. Binutils-2.16.1 - 第一遍
- 5.4. GCC-4.0.3 - 第一遍
- 5.5. Linux-Libc-Headers-2.6.12.0
- 5.6. Glibc-2.3.6
- 5.7. 调整工具链
- 5.8. Tcl-8.4.13
- 5.9. Expect-5.43.0
- 5.10. DejaGNU-1.4.4
- 5.11. GCC-4.0.3 - 第二遍
- 5.12. Binutils-2.16.1 - 第二遍
- 5.13. Ncurses-5.5
- 5.14. Bash-3.1
- 5.15. Bzip2-1.0.3
- 5.16. Coreutils-5.96
- 5.17. Diffutils-2.8.1
- 5.18. Findutils-4.2.27
- 5.19. Gawk-3.1.5
- 5.20. Gettext-0.14.5
- 5.21. Grep-2.5.1a
- 5.22. Gzip-1.3.5
- 5.23. M4-1.4.4
- 5.24. Make-3.80
- 5.25. Patch-2.5.4
- 5.26. Perl-5.8.8
- 5.27. Sed-4.1.5
- 5.28. Tar-1.15.1
- 5.29. Texinfo-4.8
- 5.30. Util-linux-2.12r
- 5.31. 清理系统
- 5.32. 改变所有者
- III. 构建 LFS 系统
- 第六章 安装系统基础软件
- 6.1. 简介
- 6.2. 挂载虚拟内核文件系统
- 6.3. 包管理
- 6.4. 进入 Chroot 环境
- 6.5. 创建系统目录结构
- 6.6. 创建必需的文件与符号连接
- 6.7. Linux-Libc-Headers-2.6.12.0
- 6.8. Man-pages-2.34
- 6.9. Glibc-2.3.6
- 6.10. 再次调整工具链
- 6.11. Binutils-2.16.1
- 6.12. GCC-4.0.3
- 6.13. Berkeley DB-4.4.20
- 6.14. Coreutils-5.96
- 6.15. Iana-Etc-2.10
- 6.16. M4-1.4.4
- 6.17. Bison-2.2
- 6.18. Ncurses-5.5
- 6.19. Procps-3.2.6
- 6.20. Sed-4.1.5
- 6.21. Libtool-1.5.22
- 6.22. Perl-5.8.8
- 6.23. Readline-5.1
- 6.24. Zlib-1.2.3
- 6.25. Autoconf-2.59
- 6.26. Automake-1.9.6
- 6.27. Bash-3.1
- 6.28. Bzip2-1.0.3
- 6.29. Diffutils-2.8.1
- 6.30. E2fsprogs-1.39
- 6.31. File-4.17
- 6.32. Findutils-4.2.27
- 6.33. Flex-2.5.33
- 6.34. GRUB-0.97
- 6.35. Gawk-3.1.5
- 6.36. Gettext-0.14.5
- 6.37. Grep-2.5.1a
- 6.38. Groff-1.18.1.1
- 6.39. Gzip-1.3.5
- 6.40. Inetutils-1.4.2
- 6.41. IPRoute2-2.6.16-060323
- 6.42. Kbd-1.12
- 6.43. Less-394
- 6.44. Make-3.80
- 6.45. Man-DB-2.4.3
- 6.46. Mktemp-1.5
- 6.47. Module-Init-Tools-3.2.2
- 6.48. Patch-2.5.4
- 6.49. Psmisc-22.2
- 6.50. Shadow-4.0.15
- 6.51. Sysklogd-1.4.1
- 6.52. Sysvinit-2.86
- 6.53. Tar-1.15.1
- 6.54. Texinfo-4.8
- 6.55. Udev-096
- 6.56. Util-linux-2.12r
- 6.57. Vim-7.0
- 6.58. 关于调试符号
- 6.59. 再次清理系统
- 6.60. 最终的清理
- 7. 配置系统启动脚本
- 7.1. 简介
- 7.2. LFS-Bootscripts-6.2
- 7.3. 启动脚本是如何工作的?
- 7.4. LFS 系统的设备和模块处理
- 7.5. 配置 setclock 脚本
- 7.6. 配置 Linux 控制台
- 7.7. 配置 sysklogd 脚本
- 7.8. 创建 /etc/inputrc 文件
- 7.9. Bash Shell 启动文件
- 7.10. 配置 localnet 脚本
- 7.11. 定制 /etc/hosts 文件
- 7.12. 为设备创建惯用符号连接
- 7.13. 配置网络脚本
- 8. 使 LFS 系统能够启动
- 8.1. 简介
- 8.2. 创建 /etc/fstab 文件
- 8.3. Linux-2.6.16.27
- 8.4. 使 LFS 系统能够启动
- 9. 结束
- 9.1. 结束
- 9.3. 重启系统
- 9.4. 现在做什么?
- IV. 附录
- A. 缩写和名词
- B. 致谢
- C. 依赖关系
- 长索引