编译内核中可能出空间不足的问题 (No space left on device)

运行make -j 2时出现磁盘空间不足错误代码:

用df -h  检看时/dev/mapper/centos-root 100%   通过动态扩容Linux根目录解决这个问题。

{standard input}: Fatal error: can't close arch/x86/crypto/ghash-clmulni-intel.mod.o: No space left on device
arch/x86/crypto/ghash-clmulni-intel.mod.c:60:1: fatal error: opening dependency file arch/x86/crypto/.ghash-clmulni-intel.mod.o.d: No space left on device
 MODULE_INFO(srcversion, "15E32769533D18CDBB785BB");
 ^
compilation terminated.
Cannot create temporary file in /tmp/: No space left on device
make[1]: *** [arch/x86/crypto/ghash-clmulni-intel.mod.o] Error 134
make: *** [modules] Error 2
make: *** Waiting for unfinished jobs....
arch/x86/tools/insn_decoder_test: success: Decoded and checked 4603984 instructions
  TEST    posttest
arch/x86/tools/insn_sanity: Success: decoded and checked 1000000 random instructions with 0 errors (seed:0x41ca01ef)
  CC      arch/x86/boot/a20.o
Cannot create temporary file in /tmp/: No space left on device
/bin/sh: line 1:   429 Aborted                 (core dumped) gcc -Wp,-MD,arch/x86/boot/.a20.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -m32 -Wa,./arch/x86/boot/code16gcc.h -g -Os -DDISABLE_BRANCH_PROFILING -Wall -Wstrict-prototypes -march=i386 -mregparm=3 -fno-strict-aliasing -fomit-frame-pointer -fno-pic -mno-mmx -mno-sse -ffreestanding -fno-stack-protector -mpreferred-stack-boundary=2 -D_SETUP -DKBUILD_BASENAME='"a20"' -DKBUILD_MODNAME='"a20"' -c -o arch/x86/boot/.tmp_a20.o arch/x86/boot/a20.c
make[1]: *** [arch/x86/boot/a20.o] Error 134
make[1]: *** Waiting for unfinished jobs....
/bin/sh: line 1:   432 Aborted                 (core dumped) ( gcc -Werror -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -m64 -O2 -fPIE -c -x c /dev/null -o "$TMP" ) > /dev/null 2>&1
/bin/sh: line 1:   437 Aborted                 (core dumped) ( gcc -Werror -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -m64 -O2 -fno-strict-aliasing -fPIC -DDISABLE_BRANCH_PROFILING -mcmodel=small -mno-mmx -mno-sse -ffreestanding -c -x c /dev/null -o "$TMP" ) > /dev/null 2>&1
/bin/sh: line 1:   442 Aborted                 (core dumped) ( gcc -Werror -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -m64 -O2 -fno-strict-aliasing -fPIC -DDISABLE_BRANCH_PROFILING -mcmodel=small -mno-mmx -mno-sse -fno-stack-protector -c -x c /dev/null -o "$TMP" ) > /dev/null 2>&1
  LDS     arch/x86/boot/compressed/vmlinux.lds
  AS      arch/x86/boot/compressed/head_64.o
Cannot create temporary file in /tmp/: No space left on device
cc1: fatal error: opening output file arch/x86/boot/compressed/vmlinux.lds: No space left on device
compilation terminated.
make[2]: *** [arch/x86/boot/compressed/vmlinux.lds] Error 1
make[2]: *** Waiting for unfinished jobs....
/bin/sh: line 1:   461 Aborted                 (core dumped) gcc -Wp,-MD,arch/x86/boot/compressed/.head_64.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -m64 -O2 -fno-strict-aliasing -fPIC -DDISABLE_BRANCH_PROFILING -mcmodel=small -mno-mmx -mno-sse -D__ASSEMBLY__ -c -o arch/x86/boot/compressed/.tmp_head_64.o arch/x86/boot/compressed/head_64.S
make[2]: *** [arch/x86/boot/compressed/head_64.o] Error 134
make[1]: *** [arch/x86/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2
 

你可能感兴趣的:(linux)