Error while compiling linux kernel on Linux mint 17

核能气质少年 提交于 2019-12-11 22:36:04

问题


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.


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/26423317/error-while-compiling-linux-kernel-on-linux-mint-17

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!