error: [scripts/Makefile.modinst:33: arch/x86/crypto/aegis12



我试图在QEMU上替换Ubuntu 20.04中的linux内核(不确定QEMU是否相关(,但我得到了下一个错误:

INSTALL arch/x86/crypto/aegis128-aesni.ko
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:69
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:76
sign-file: : No such file or directory
make[1]: *** [scripts/Makefile.modinst:33: arch/x86/crypto/aegis128-aesni.ko] Error 1
make: *** [Makefile:1482: _modinst_] Error 2

我正在遵循以下步骤:

  1. 通过运行下一个命令创建一个新的空映像:
./qemu-img create -f qcow2 ../ubuntu-desktop-20.04.qcow2 60G

我创建60G是因为我们需要在QEMU中编译内核。

  1. 下载ubuntu ISO文件(https://ubuntu.com/download/desktop)。使用ubuntu-desktop20.04.qcow2和新的ubutnu ISO文件运行ubuntu:
build/qemu-system-x86_64 -cpu host -enable-kvm -boot d -m 2G -drive if=virtio,file=<full path to ubutnu image>/ubuntu-desktop-20.04.qcow2 -cdrom <full path to ubutnu iso>/ubuntu-20.04.2.0-desktop-amd64.iso

并安装ubuntu。我创建了用户名";客人;以及密码";1234";

使用新安装的ubuntu:启动qemu

build/qemu-system-x86_64  
-cpu host -enable-kvm 
-m 16G 
-vnc :0 
-drive if=virtio,file=<full path to ubutnu image>/ubuntu-desktop-20.04.qcow2,cache=none 
-device e1000,netdev=net0 
-netdev user,id=net0,hostfwd=tcp::55556-:22

并通过vnc登录。启用ssh:安装ssh并永久启用:

sudo apt install ssh
sudo -s
systemctl enable ssh
exit

尝试使用ssh:进入

ssh guest@localhost -p 55556

你会得到下一个错误:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:kaSFtMxfTugjSHZJi1E1lCA5+GzBL5F8UuEQhgavVKo.
Please contact your system administrator.
Add correct host key in /home/yehuda.s/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/yehuda.s/.ssh/known_hosts:22
remove with:
ssh-keygen -f "/home/yehuda.s/.ssh/known_hosts" -R "[localhost]:55556"
ECDSA host key for [localhost]:55556 has changed and you have requested strict checking.
Host key verification failed.

运行下一个命令:

ssh-keygen -f "/home/yehuda.s/.ssh/known_hosts" -R "[localhost]:55556"

然后再次尝试ssh。

安装:

sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev

下载所需的内核(可以从https://www.kernel.org/)进入qemu。我下载了5.12.13。cd放入下载的文件夹并提取文件:

tar -xvf linux-tar.xz

cd到linux-5.12.13中,并将当前ubutnu内核的配置复制到以下文件夹中:

cp -v /boot/config-$(uname -r) .config

在从/boot复制的.config文件中,找到config_SYSTEM_TRUSTED_KEY和config_MODULE_SIG_KEY行,并删除它们的值(留空"(。

运行:

make menuconfig #- and config this as you want (I did nothing)...
make -j
make modules_install

我看到:https://www.reddit.com/r/linuxquestions/comments/byinth/cannot_stat_archx86cryptoaegis128aesniko_no_such/和https://unix.stackexchange.com/questions/389484/aes-x86-64-ko-no-such-file-or-directory-for-module-installation-failure-after-4#389511错误,并尝试了他们的建议-但它不起作用

解决了它。。。运行后

cp -v /boot/config-$(uname -r) .config

需要运行

make localmodconfig

按回车键获取所有默认值,然后继续

make
sudo make modules_install
sudo make install

在这里找到的https://rev2.vasanthdeveloper.com/compiling-the-linux-kernel-on-ubuntu-debian/index.html

相关内容

  • 没有找到相关文章

最新更新