无法在 wsl2 virtualbox 上创建 docker 机器

无法在 wsl2 virtualbox 上创建 docker 机器

我正在使用 wsl2 测试一些 docker 命令。我在 wy win11 主机上安装了 virtualbox 7.0。我认为当我输入命令时它将用于控制创建的节点:docek-machine create --driver virtualbox node。显示错误:

  WARNING: The character device /dev/vboxdrv does not exist.
             Please install the virtualbox-dkms package and the appropriate
             headers, most likely linux-headers-standard.

     You will not be able to start VMs until this problem is fixed.

Oracle VM VirtualBox Command Line Management Interface Version 6.1.38_Ubuntu
(C) 2005-2022 Oracle Corporation
All rights reserved.

还出现另一个错误:

Error with pre-create check: "We support Virtualbox starting with version 5. Your VirtualBox install is \"WARNING: The character device /dev/vboxdrv does not exist.\\n\\t Please install the virtualbox-dkms package and the appropriate\\n\\t headers, most likely linux-headers-standard.\\n\\n\\t You will not be able to start VMs until this problem is fixed.\\n6.1.38_Ubuntur153438\". Please upgrade at https://www.virtualbox.org"

当我尝试通过键入以下内容安装虚拟盒 dmks 时:

sudo apt install virtualbox-dkms linux-headers-$(uname -r) 

it shows me this error : 
sudo apt install virtualbox-dkms linux-headers-$(uname -r)
E: Unable to locate package linux-headers-5.10.16.3-microsoft-standard-WSL2
E: Couldn't find any package by glob 'linux-headers-5.10.16.3-microsoft-standard-WSL2'

我该如何解决这个问题?我真的需要你的帮助,我被封锁了 3 个小时。

相关内容