windows10環境下,remote wsl鏈接wsl ubuntu使用ubuntu 開發環境,報錯:VS Code server for WSL closed unexpectedly check WSL terminal for more details


報錯提示這樣

image
在windows的vscode里面的關鍵報錯信息是:vscode wsl Unable to detect if server is already installed: Error: Command f......

原因:

windows wsl的ubuntu啟動之后,沒有安裝vscode,所以windows的vscode鏈接不上上面報錯信息的server

解決辦法:

更新ubuntu包

sudo sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
sudo apt update -y
sudo apt upgrade -y

安裝ubuntu的vscode:

code

等待安裝完成,回到windows的vscode ,重新打開wsl就可以了

image


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM