# [SOLVED]Compiling kernel Error 2 arch/x86 first time install

## GnuSprout

Greetings. I'm new to gentoo and today I was trying to install it on my machine. 

I've been following the installation handbook but I've been unable to finish  my kernel compiling. And this is the error that I get.

```
OBJCOPY arch/x86/boot/compressed/vmlinux.bin

RELOCS arch/x86/boot/compressed/vmlinux.relocs

LZ4 arch/x86/boot/compressed/vmlinux.bin.lz4

/bin/sh: lz4c: command not found 

make[2]: *** [arch/x86/boot/compressed/Makefile:148: arch/x86/boot/compressed/vmlinux.bin.lz4] Error 127

make[2]: *** Deleting file 'arch/x86/boot/compressed/vmlinux.bin.lz4'

make[1]: *** [arch/x86/boot/Makefile:112 arch/x86/boot/compressed/vmlinux] Error 2

make: *** [arch/x86/Makefile:285: bzImage] Error 2
```

I've been looking around for a fix but haven't seen any Error 2 post with that particular makefile (Makefile:285 / 112).

Tried doing a 

```
make clean
```

But did also not work.

What should I do? 

Thank youLast edited by GnuSprout on Sun Nov 15, 2020 4:17 pm; edited 1 time in total

----------

## pietinger

 *GnuSprout wrote:*   

> 
> 
> ```
> LZ4 arch/x86/boot/compressed/vmlinux.bin.lz4
> 
> ...

 

Try this:

General setup --> Kernel compression mode (Gzip)  --->

If you have a running system later, you then can switch to LZ4.

----------

## Hu

 *GnuSprout wrote:*   

> I've been following the installation handbook but I've been unable to finish  my kernel compiling. And this is the error that I get.
> 
> ```
> OBJCOPY arch/x86/boot/compressed/vmlinux.bin
> 
> ...

 You told the kernel to use LZ4 compression, but you did not install the tool lz4c, which the kernel needs in order to do such compression.  This tool comes from the package app-arch/lz4.  You can emerge that package, or take pietinger's suggestion to tell the kernel not to use LZ4, at which point you will not need the lz4c tool.

----------

## GnuSprout

 *Quote:*   

> You told the kernel to use LZ4 compression, but you did not install the tool lz4c, which the kernel needs in order to do such compression.  This tool comes from the package app-arch/lz4.  You can emerge that package, or take pietinger's suggestion to tell the kernel not to use LZ4, at which point you will not need the lz4c tool.

 

This worked. I managed to finish compiling and got to reboot into the OS.  Thank you very much.

----------

