什么是"Failed to create hard link: File exists"错误?



我正在尝试使用远程SSH扩展从VSCode进行SSH登录,但收到此错误。当我从GIT终端登录时,它工作正常。

错误堆栈:

[20:44:36.547] > ln /root/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/vscode-rem
> ote-lock.root.a5d1cc28bb5da32ec67e86cc50f84c67cc690321.target /root/.vscode-serv
> er/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/vscode-remote-lock.root.a5d1cc28
> bb5da32ec67e86cc50f84c67cc690321
> 
[20:44:36.555] > ln: failed to create hard link ‘/root/.vscode-server/bin/a5d1cc28bb5da32ec67e86c
> c50f84c67cc690321/vscode-remote-lock.root.a5d1cc28bb5da32ec67e86cc50f84c67cc6903
> 21’: File exists
> Installation already in progress...
> e6e07fdafb38##24##
> 
[20:44:36.555] Received install output: e6e07fdafb38##24##
[20:44:36.556] Server installation process already in progress - waiting and retrying
[20:44:36.827] "install" terminal command done
[20:44:36.827] Install terminal quit with output: 
[20:44:37.557] Resolver error: 
[20:44:37.560] ------

更新VScode后我遇到了同样的问题。

不确定这是否是正确的解决方案,但它确实有效:

  1. 通过另一个 ssh 程序(如 PuTTY(登录到您的服务器,因为您的文件位于 root 用户主目录中,您需要以 root 用户身份登录才能执行此操作。
  2. 从目录中删除文件夹a5d1cc28bb5da32ec67e86c/root/.vscode-server/bin/

在这里找到答案:

https://github.com/microsoft/vscode-remote-release/issues/2507

相关内容

最新更新