简体   繁体   中英

Fail to open vscode in WSL bash on ubuntu using cmd code

When I tried to open vscode in WSL bash on Ubuntu 20.04 using command code . , it failed and the following message was logged:

/mnt/c/Users/john/.vscode/extensions/ms-vscode-remote.remote-wsl-0.50.1/scripts/wslCode.sh: 57: /home/john/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/bin/code: not found

I would like to ask how to fix this problem? Thx a lot!

I found the solution. Even though I think that you've already know it.

You need to delete the folder /home/john/.vscode-server/ with sudo rm -rf /home/john/.vscode-server .

Then, you just run code . or try to open any project that you want it.

Then a script will load and will install a new .vscode-server in your machine with the right files.

这不适合我,同样的问题:(

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM