在Linux 17上编译Linux内核时出错

时间:2014-10-17 10:44:00

标签: linux linux-kernel linuxmint

尝试在Linux mint cinnamon 64bit上编译内核Linux时出现以下错误

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

此命令(#make modules)已成功完成,没有任何错误。 安装了gcc,build-essentials和g ++。

系统在虚拟机4核+ 3 GB RAM + 40GB自由空间上运行。

2 个答案:

答案 0 :(得分:2)

当我尝试在Ubuntu 14.04上编译内核3.17.6时,我遇到了这个问题。我终于发现这个错误只是因为make进程没有正确完成。就像描述的错误一样,Can't read private key.在某些步骤编译内核时会生成私钥。该消息如下:

###
### 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.
###

我没有意识到make失败的原因是我使用make -j 16让16进程同时编译并且错误被覆盖。我失败了,因为我使用没有安装bc的Ubuntu服务器。

我希望这些信息可以帮到你。

答案 1 :(得分:2)

要解决此错误,我运行make,首先编译内核。我正在尝试make modules_install而不先编译内核。因此我运行了以下内容。

  

相关问题