【问题标题】:Opening WSL remote window not working - command wslpath not found打开 WSL 远程窗口不起作用 - 找不到命令 wslpath
【发布时间】:2019-07-09 12:29:33
【问题描述】:

在尝试打开新的 Remote-WSL 窗口时,我在“在 WSL 中安装 VS 代码服务器(详细信息):安装 WSL 组件”步骤中遇到错误。似乎找不到 wslpath 命令。

我尝试查看我的 PATH 变量,但我没有在任何地方看到 wslpath,也不知道路径应该是什么样子?我也尝试重新安装我的 linux 发行版,但没有帮助。

[2019-07-09 12:23:39.266] Launching C:\Windows\System32\wsl.exe bash -c "'$(wslpath -u 'c:/Users/laida/.vscode/extensions/ms-vscode-remote.remote-wsl-0.38.8/scripts/wslServer.sh')' '0f3794b38477eea13fb47fbe15a42798e6129338' 'stable' '.vscode-server' 'C:/Users/laida/AppData/Local/Temp/vscode-remote-wsl/0f3794b38477eea13fb47fbe15a42798e6129338/vscode-server-linux-x64.tar.gz' 0  " in c:\Users\laida\.vscode\extensions\ms-vscode-remote.remote-wsl-0.38.8
[2019-07-09 12:23:39.562] /bin/bash: wslpath: command not found
[2019-07-09 12:23:39.562] bash: : command not found
[2019-07-09 12:25:10.024] VS Code Server for WSL failed to start. No messages received for 90s

【问题讨论】:

  • 键入此命令which wslpath。如果这不返回 /bin/wslpath 路径,那么您使用的是旧的 Windows 10 版本。

标签: visual-studio-code windows-subsystem-for-linux


【解决方案1】:

我今天在启动 Remote - WSL 时遇到了这个问题。正如@Biswapriyo 所指出的,我使用的是较旧的Windows 10 版本,因此我通过从https://github.com/laurent22/wslpath 安装wslpath 解决了这个问题 (注意:我还必须安装 php 才能工作)。 之后我能够启动远程 - WSL 我想安装更新的 Windows 10 版本可能也可以,但我无法做到这一点(托管映像),即使我能够做到,这有点像用大锤杀死蚂蚁。

【讨论】:

    猜你喜欢
    • 2021-07-27
    • 2021-11-23
    • 1970-01-01
    • 2014-09-28
    • 2019-01-03
    • 1970-01-01
    • 2013-11-17
    • 2018-03-19
    • 2018-05-21
    相关资源
    最近更新 更多