我使用 swift 网站上的说明在 Windows (WSSL) 上安装了适用于 Ubuntu 18.04 的 Swift:https://swift.org/download/#using-downloads
它似乎正在识别版本,但是当我只是键入 swift
进入 REPL 时,它似乎卡住了,我不能不退出终端就退出 shell:
allen@LAPTOP-C6O7O7KR:~$ swift --version
Swift version 5.0.1 (swift-5.0.1-RELEASE)
Target: x86_64-unknown-linux-gnu
allen@LAPTOP-C6O7O7KR:~$ swift
let x = 5;
print(x)
;
exit
^C
:q
:q
exit
^C
知道为什么会发生这种情况吗?
最佳答案
我假设它与 https://github.com/microsoft/WSL/issues/688 有关
ptrace(PTRACE_TRACEME, 0, 0, 0) = -1 EPERM (Operation not permitted)
关于swift repl 在 linux 的 windows 子系统中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55885759/