1. 程式人生 > 其它 >Docker 執行時提示 WSL 2 is not installed

Docker 執行時提示 WSL 2 is not installed

技術標籤:Docker

問題描述

WSL 2 is not installed

Install WSL using this PowerShell script (in an administrative PowerShell) and restart your computer before using Docker Desktop:

Enable-WindowsOptionalFeature -Online -FeatureName $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")

嘗試解決方法

  • cmd 中執行 systeminfo 檢視是否啟用 Hyper-V

  • 【控制面板】–【程式】–【啟用或關閉 Windows 功能】,勾選新增 Hyper-V 全部選項,確定

繼續報錯

  • WSL 2 installation is incomplete.

解決方法

  • 點選彈出視窗提示的地址,下載並安裝微軟官方提供的 wsl_update_x64.msi
  • 重啟

參考

  • https://docs.microsoft.com/en-us/windows/wsl/install-win10#step-4—download-the-linux-kernel-update-package