1

我正在开始尝试让我的机器运行 WSL 2 的过程,我首先按照 Microsoft 要求您运行的教程的第一步开始:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

这产生了以下错误:

dism.exe : The term 'dism.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
+ dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsy ...
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (dism.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

这种问题对我来说并不新鲜,一周前我试图运行 ssh 并且我得到了同样的错误,事实上,除了基本的 cd 或 ls 命令之外,似乎其他任何东西都会导致同样的错误。为什么我的电源外壳不识别任何东西?

我正在运行 Windows 10 Home,我尝试以管理员身份运行,而不是。我曾尝试在基本命令行和 windows power shell 中运行。接下来我该怎么办?

编辑:运行评论推荐的路径命令并得到这个结果

C:\Users\Nathaniel>echo [%path:;=]&echo.[%]
[C:\Program Files (x86)\Razer Chroma SDK\bin]
[C:\Program Files\Razer Chroma SDK\bin]
[C:\Program Files (x86)\Razer\ChromaBroadcast\bin]
[C:\Program Files\Razer\ChromaBroadcast\bin]
[C:\Program Files (x86)\Common Files\Oracle\Java\javapath]
[C:\Program Files\Java\jre1.8.0_181\bin]
[C:\Program Files\Git\cmd]
[D:\Prolog\swipl\bin]
[C:\ProgramData\chocolatey\bin]
[C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps]
[D:\Putty\]
[C:\Users\Nathaniel\AppData\Local\Microsoft\WindowsApps]
[C:\Users\Nathaniel\AppData\Local\GitHubDesktop\bin]
[C:\Users\Nathaniel\AppData\Local\Microsoft\WindowsApps]
[D:\Visual Studio Code\Microsoft VS Code\bin]
[D:\Anaconda]
[]
[D:\docker toolbox\Docker Toolbox]
4

0 回答 0