FAQ/zh-cn

常见问题页面Article description::汇集了来自gentoo-dev邮件列表在Freenode Internet Relay Chat(IRC)上 Gentoo 频道的常见问题.

介绍
请注意：这里面的许多问题的答案已经出现在官方手册和指引中. 这只是一个常见问题的简单列表. 想获得Gentoo和GNU/Linux如何运行的详细解释，以及这里没有回答的那些问题，请认真阅读 Gentoo 文档和帮助页面.

gentoo如何发音，它表示什么意思？
Gentoo 发音为 "gen-too"，其中的"g"发清辅音，与单词 "gentle" 一样. gentoo 企鹅的学名为 “巴布亚企鹅（Pygoscelis papua）” 巴布亚企鹅. gentoo 是福克兰群岛（Falkland） 福克兰群岛当地居民为这种企鹅取的名字.

什么使 Gentoo 与众不同？
gentoo使用了与bsd的ports系统类似的portage系统. portage是一种软件包管理 系统，它使得在gentoo系统中软件的安装与维护十分灵活. 它提供了编译时选项 （通过USE标志），条件依赖，预安装软件包概述，通过沙盒安全地安装软件包，系统描述，以及包含其它几个特性的配置文件保护功能.

默认的情况下，Gentoo 的整个系统都是用户从源代码，使用优化过的选项编译而成. 对于安不安装什么软件，用户有完全的控制权. Gentoo 提供了丰富的选项， 用户可以把 Gentoo 安装成他们最喜欢的样子，这也就是为什么 Gentoo 被称为"元 发行版"了.

gentoo开发活跃，整个开发采用快速的开发模式：软件包补丁被迅速集成到主线 开发树；文档基本每天更新；portage特性添加频繁；官方发布一年更新两个版 本.

使用'-O9 -ffast-math -fomit-frame-pointer' 优化选项后系统变得不可用，发生了什么？
不要使用高于"-O3"的任何选项，因为目前版本的gcc不支持. 过于激进的优化选 项会使编译器将汇编代码精简至无法正常工作的地步.

在报告bug前，尝试对 CFLAGS / CXXFLAGS 使用  重新编译.

如何修改root或其它用户的密码？
使用passwd命令修改当前登录用户的密码，root用户通过passwd username可修 改其它用户的密码，man passwd查看手册了解其它选项和设置.

如何添加普通用户？
命令"useradd larry"将添加普通用户larry. 然而，这种方法没有赋予用户足够 的权力来正常使用系统，推荐使用：

这将会添加一个名为“larry”的用户 :加入用户组


 * :系统中标准的交互型用户组
 * :允许使用音频的用户组
 * :允许使用su命令切换到root权限，前提知道root用户的密码

为什么用户不能su到root?
出于安全考虑，只有属于  用户组的用户才能使用  切换至 root. 以 root 身 份执行以下命令，将用户添加到 用户组：

不重装系统，如何将gentoo从一个版本升级至另一个版本？
事实上，各个gentoo版本在安装后并无不同. gentoo 1.4及后续版本基于 （或更高）. 如此，运行命令 即可更新至最新gentoo. 单个gentoo版本间的不同，只在于安装介质与 其中包含的预编译好的软件包. 参见Gentoo Upgrading Guide查看更多描述文件以及它 们在升级中扮演的角色的信息.

同时注意， 命令会更新已安装的软件包以及它们的依赖.

安装后内核启动失败，怎么办？
这并不意味着要重做安装中的每一个步骤，审查编译内核及内核相关的安装步骤 却是必要的. 假设gentoo安装在 和  with (swap)用作交换分区.

从安装光盘启动，命令提示符显示.

首先，所有分区:

chroot至gentoo环境配置内核：

现在选择或取消在之前安装中错误的选项，退出，然后编译安装内核：

如果是LILO用作启动器，重新运行, grub用户可跳过.

退出 ，重启：

Please see this article from the Knowledge Base for further details.

请从 Knowledge Base 查看这篇文章了解更多详细信息

如果是启动器的问题，一样地步骤，只不过是对启动器重新配置，而不是对内核 重新配置与编译. 一般启动器并不需要重新编译.

网络代理需要需要授权，怎么办？
让portage自动使用方案，在/etc/portage/make.conf中定义代理：

记住代理服务器必需支持用于rsync端口的 连接 方法.

如何刻录ISO文件？
ISO文件必须以raw模式进行刻录. 这意味着该文件应该不会被放置在CD上，而是被解释为整个CD.

There are lots of CD burning tools available; covering them all would be a Sisyphean problem. However, describing a few popular tools never hurts:


 * With EasyCD Creator select, . Then change the to . Then locate the ISO file and click . After clicking  the ISO image will be burned correctly onto the CD/DVD.


 * With Nero Burning ROM, cancel the wizard which automatically pops up and select from the  menu. Select the image to burn and click . Now click the  button and watch the brand new Gentoo Live CD being burnt.


 * With, simply type (replace  with the CDROM drive's device path) followed by the path to the ISO file.


 * With K3B, select →  → . Then locate the ISO file within the 'Image to Burn' area. Click  to begin the burn process.


 * With Mac OS X Panther, launch from, select  from the  menu, select the mounted disk image in the main window and select  in the  menu.


 * With Mac OS X Jaguar, launch from, select  from the  menu, select the ISO and click the  button.

我的CPU应该使用什么CD / stage
First find out what CPU is in the system Gentoo is to be installed on (for instance a Pentium-M). Next find out what CPU type it is compatible with (instruction-wise) to find a proper match with Gentoo's CD or stages. Consulting the CPU's vendor website for this information usually works, although querying a search engine of choice is usually more efficient.

When uncertain, take a "lower" CD/stage file, for instance a i686 or even generic x86 (or the equivalent in the system's arch). This will ensure that the system will work, but may not be as fast as further optimizations.

Please note that many more options exist than those for which Gentoo builds binary stages. Please see the GCC guide for setting the  flag.

重新启动后，互联网不工作了. 哪里不对？
First verify that the network card is discovered properly by the kernel. Run and look for network interfaces. Something such as eth0, eno1, enp2s0, enp0s8, wlan0, wlp5s6 (in case of certain wireless network cards) should be present. Specific kernel modules may be required for the kernel to properly detect the network card. If that is the case, make sure that the required kernel modules are listed via a file ending in  in.

If support for the system's network card has been left out of the kernel, it will need to be reconfigured and, in some cases, recompiled.

If the network card is found by the kernel, but the network configuration has been set to use DHCP, a DHCP client might not have been installed on the system. There are many DHCP clients available in Gentoo, a common one being. If necessary to get the connection to the Internet working reboot to the installation CD and install.

Information on how to rescue the system using the installation CD is available here as well.

可以使用Windows或其他操作系统进行双引导吗？
当然可以！ 可能最快的方法是使用 安装 GRUB2. 在 GRUB2 文章，以及特别对使用 GRUB2 进行双启动的用户在这里阅读有关信息.

尝试从GRUB Legacy或LILO启动Windows仅显示黑屏. 我该怎么办？
This is a known problem and only applies to older bootloaders such as GRUB Legacy and LILO. Windows refuses to boot when it is not installed on the first hard drive and shows a black/blank screen. To handle this, it is necessary to "fool" Windows into believing that it is installed on the first hard drive with a little tweak in the boot loader configuration. Please note that in the below example, Gentoo is installed on (first disk) and Windows on  (second disk). Adjust the configuration as needed:

This will make Windows believe it is installed on the first hard drive and boot without problems. More information can be found in official GRUB documentation and in.

如何使用stage1或stage2 tarball安装Gentoo？
The Gentoo Handbook only describes a Gentoo installation using a stage3 tarball. This is for development purposes (the Release Engineering team starts from a stage1 tarball to obtain a stage3) but should not be used by users: a stage3 tarball can very well be used to bootstrap the system. A working Internet connection is a requirement.

Bootstrapping means building the toolchain (the C library and compiler) for the system after which all core system packages are installed. To bootstrap the system, perform a stage3 installation. Before starting the chapter on Configuring the Kernel, it might be necessary to modify the script to match personal requirements:

修改后，运行脚本.

Next, rebuild all core system packages with the newly built toolchain. We need to rebuild them since the stage3 tarball already offers them:

现在继续 配置内核.

软件包里储存着什么 ？
Packages are not "stored" per se. Instead, Gentoo provides a set of scripts which can resolve dependencies, fetch source code, and compile a version of the package tailored to the user's needs. Generally Gentoo only builds binaries for releases and snapshots. The Gentoo Developer Manual covers the contents of an ebuild script in detail.

For full ISO releases, a full suite of binary packages will be created using an enhanced format, which is  compatible with meta-information attached to the end of the file. These can be used to install a working (though not fully optimized) version of the package quickly and efficiently.

It is possible to create RPMs (Red Hat package manager files) using Gentoo's Portage, but it is not currently possible to use existing RPMs to install packages.

我想自己执行 ./configure 步骤. 可以么？
Yes, but it is not trivial, nor is it recommended. Since the method to do this requires a good understanding of Portage internals and commands, it is instead recommended that the ebuild is patched to do whatever it is that the user wants and place it in a Portage overlay (that is why overlays exist). This is much better for maintainability, and usually easier. See the Gentoo Developer Manual for more information.

如果我不能使用 rsync 怎么办？
When behind a firewall that does not permit rsync traffic through port 873, the command can be used to fetch and install a Portage snapshot through regular HTTP. See this section for information on downloading source files and Portage snapshots via a proxy.

我家里的网络连接很慢（或没有网络）. 我可以在其他地方下载源并把他们添加到系统中吗？
Definitely. Run to see what programs are going to be installed. To find out the sources for those packages and where to download the sources from, run. Download sources and bring them on any media home. Put the sources into the folder and then simply run. Be warned: this can be a very tedious process.

源的 tarball 在 /var/cache/distfiles/ 中，删除这些文件安全么？
Deleting these files will have no negative impact on day-to-day performance. However, it might be wise to keep the most recent version of the files; often several ebuilds will be released for the same version of a specific piece of software. If the archive is deleted and the software is upgraded or rebuilt it will be necessary to download them from the Internet again.

Use the script from  to manage the contents of  and a few other locations. Please read to learn more about its usage, as well as the Gentoolkit article.

/var/tmp/portage 中是什么? 删除在 /var/tmp/portage 的文件和目录安全么？
During compilation, Gentoo saves the sources of the package in (or in  if the default is changed). These files and folder are usually deleted upon a successful merge, but this sometimes fails. It is safe to clean out all contents of this directory if the command is not running. Be sure to always before cleaning out this directory.

如何设置国际键盘布局？
Edit the keymap variable in. To have console working correctly with extended characters in the keymap, it might be necessary to set the consolefont and consoletransation variables in the  file (for further information on localizing the environment, refer to the localization guide). Then, issue a, or restart the and  scripts:

只有 root 用户能使用 DNS 解析
权限错误，用 设置为允许：

为什么我的用户不能使用他们自己的 crontab？
将用户添加到 组：

我该如何让数字锁定键在启动时开启？
下列命令将把 服务添加到 default runlevel, 在启动时启用  ：

每个 GUI 程序都为这类事情提供了不同的工具；请查看帮助部分或所使用 GUI程序 的在线手册以获得进一步的帮助.

当我登出时，如何清除我的终端屏幕？
清除终端屏幕只需把 命令添加到用户的  脚本中：

若想在添加新用户时自动设置，在 也这样做即可：

ReiserFS 和文件系统的损坏问题 -如何修复他们等问题
If the ReiserFS partition is corrupt, try booting the Gentoo Install CD and run on the corrupted filesystem. This should make the filesystem consistent again, although there may be some lost files or directories due to the corruption.

哪里可以报告错误？
Use the Bugzilla site to report bugs. Visit on the Freenode IRC network and ask around if it is unclear whether an issue is really a bug or not.

多久发布一次新版本？
Gentoo's packages are usually updated shortly after the upstream authors release new code. As for when Gentoo itself makes new stage/profile/ISO releases, check the Release Engineering Project page. New releases are announced on the gentoo-announce mailing list. See this section for more information.

我的扬声器疯狂发出嘟嘟声. 如何禁用控制台哔声？
可以使用 关闭控制台提示音，如下所示：

To turn off the console beeps on boot, put the following command in the file. However, this only disables beeps for the current terminal. To disable beeps for other terminals, pipe the command output to the target terminal, like this:

Replace with the terminal for which console beeps need to be disabled.

更多细节请查看这篇文章.

为什么许多 Gentoo 特定的工具和函数的名称中都有字母 ‘e’ ？
‘e’ 之所以成为开头，是因为 Gentoo 最初的名字是 Enoch Linux. 因此 Gentoo 的许多工具和函数名都维持前缀 ‘e’.

这是来自 的引文：“我认为 'e' 可能来自于 enoch，并且被选为 'iMac' 缩写中的单字符前缀，该词最初于 1998 年 8 月发布，Enoch 始于 1999 年初. ”（请参阅 https://www.funtoo.org/Funtoo_Linux_History ）.

在哪里可以找到有关Gentoo Linux的更多信息？
大部分 Gentoo 官方文档可以在这里的 wiki 找到.

我可以购买 Gentoo Linux 的 CD 吗？
无法亲自下载和刻录安装CD的用户可能会通过我们的授权商店找到. 然而，大多数商店已经放弃提供CD和DVD，因为这些安装介质很快就会过时.

授权商店在商店页列出.

这个FAQ没有回答我的问题. 现在我该怎么做？
第一步推荐浏览相关的文档, 如果不行, 这里列出了各种 Gentoo Linux 邮件列表. 如果还不行，试试逛逛 Gentoo folks，或者在  Freenode IRC 频道看看.