简体   繁体   中英

Error while compiling linux kernel on Linux mint 17

I have the following error while trying to compile kernel Linux on Linux mint cinnamon 64bit

linux-3.17.1 # make modules_install

INSTALL arch/x86/crypto/aes-x86_64.ko

Can't read private key

make[1]: *** [arch/x86/crypto/aes-x86_64.ko] Error 2

make: *** [_modinst_] Error 2

This command (#make modules) had been done successfully without any errors. gcc, build-essentials and g++ are installed.

The system is running on virtual machine 4 cores + 3 GB of ram + 40GB freespace.

I encountered the problem those days when I tried to compile kernel 3.17.6 on Ubuntu 14.04. I finally found this error is simply because that the make process didn't finished correctly. Just like the error described, Can't read private key. The private key is generated when compiling the kernel at some steps. The message looks like:

###
### Now generating an X.509 key pair to be used for signing modules.
###
### If this takes a long time, you might wish to run rngd in the
### background to keep the supply of entropy topped up.  It
### needs to be run as root, and uses a hardware random
### number generator if one is available.
###
openssl req -new -nodes -utf8 -"sha512" -days 36500 \
        -batch -x509 -config x509.genkey \
        -outform DER -out signing_key.x509 \
        -keyout signing_key.priv 2>&1
Generating a 4096 bit RSA private key
..................................................................................++
............++
writing new private key to 'signing_key.priv'
-----
###
### Key pair generated.
###

The reason I didn't realized that the make failed is that I use make -j 16 to let 16 process compiling simultaneously and the error was overwritten. I failed because I use Ubuntu server without bc installed.

I hope this information would help you.

To solve this error I ran make, to compile the kernel first. I was trying make modules_install without compiling kernel first. Thus I ran the following.

make

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM