我正在尝试在一台计算机上安装 Gentoo amd64惠普 DL380 G4。我已经成功到达配置Linux内核Gentoo 安装手册中的部分。使用此命令后:
emerge --ask sys-kernel/gentoo-sources
我得到以下输出:
(chroot) livecd / # emerge --ask sys-kernel/gentoo-sources
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild N ] sys-devel/bc-1.06.95-r2 USE="readline -libedit -static"
[ebuild N ] sys-kernel/gentoo-sources-4.14.65 USE="-build -experimental -symlink"
Would you like to merge these packages? [Yes/No] yes
>>> Verifying ebuild manifests
>>> Emerging (1 of 2) sys-devel/bc-1.06.95-r2::gentoo
* Fetching files in the background.
* To view fetch progress, run in another terminal:
* tail -f /var/log/emerge-fetch.log
* bc-1.06.95.tar.bz2 BLAKE2B SHA512 size ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking bc-1.06.95.tar.bz2 to /var/tmp/portage/sys-devel/bc-1.06.95-r2/work
>>> Source unpacked in /var/tmp/portage/sys-devel/bc-1.06.95-r2/work
>>> Preparing source in /var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95 ...
* Applying bc-1.06.95-void_uninitialized.patch ... [ ok ]
* Applying bc-1.06.95-mem-leak.patch ... [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95 ...
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --libdir=/usr/lib64 --with-readline --without-libedit
checking for a BSD-compatible install... /usr/lib/portage/python3.6/ebuild-helpers/xattr/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95/config.log
* ERROR: sys-devel/bc-1.06.95-r2::gentoo failed (configure phase):
* econf failed
*
* Call stack:
* ebuild.sh, line 124: Called src_configure
* environment, line 2172: Called econf '--with-readline' '--without-libedit'
* phase-helpers.sh, line 718: Called __helpers_die 'econf failed'
* isolated-functions.sh, line 121: Called die
* The specific snippet of code:
* die "$@"
*
* If you need support, post the output of `emerge --info '=sys-devel/bc-1.06.95-r2::gentoo'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/bc-1.06.95-r2::gentoo'`.
* The complete build log is located at '/var/tmp/portage/sys-devel/bc-1.06.95-r2/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/bc-1.06.95-r2/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95'
* S: '/var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95'
>>> Failed to emerge sys-devel/bc-1.06.95-r2, Log file:
>>> '/var/tmp/portage/sys-devel/bc-1.06.95-r2/temp/build.log'
* Messages for package sys-devel/bc-1.06.95-r2:
* ERROR: sys-devel/bc-1.06.95-r2::gentoo failed (configure phase):
* econf failed
*
* Call stack:
* ebuild.sh, line 124: Called src_configure
* environment, line 2172: Called econf '--with-readline' '--without-libedit'
* phase-helpers.sh, line 718: Called __helpers_die 'econf failed'
* isolated-functions.sh, line 121: Called die
* The specific snippet of code:
* die "$@"
*
* If you need support, post the output of `emerge --info '=sys-devel/bc-1.06.95-r2::gentoo'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/bc-1.06.95-r2::gentoo'`.
* The complete build log is located at '/var/tmp/portage/sys-devel/bc-1.06.95-r2/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/bc-1.06.95-r2/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95'
* S: '/var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95'
问题可能是什么?
答案1
相关行是这样的:
checking for C compiler default output file name... configure: error: C compiler cannot create executables
这意味着当检查包configure
的脚本bc
(内核构建过程所需的)以确保按照指定的方式调用 C 编译器 (GCC) 时,它会失败。造成这种情况的可能原因包括但不限于:
- 无效选项(在 Gentoo 上将位于
CFLAGS
中的变量中/etc/portage/make.conf
)。这是最有可能的情况。示例包括将-fstack-protector
选项传递给较旧的 GCC 版本、尝试在错误类型的系统上构建 32 或 64 位代码,或者在构建没有 Graphite 支持的 GCC 时尝试使用 Graphite 优化选项。 - 硬件问题(RAM 故障、PSU 故障、CPU 故障等)。
- 磁盘上的静默数据损坏。
- 内存不足(除非您已经配置了内置内容,否则不太可能)
tmpfs
和你没有太多内存)。