VS代码在WSL -2 Ubuntu 18.04服务器中未打开 - 给出命令'代码'未找到

发布于 2025-02-10 12:01:47 字数 439 浏览 0 评论 0原文

输入代码时,我在WSL中给出了这种错误。

samanthika-137:~/repos/wams$ code .

Command 'code' not found, did you mean:

  command 'cde' from deb cde (0.1+git9-g551e54d-1.1build1)
  command 'cdde' from deb cdde (0.3.1-1build1)
  command 'ode' from deb plotutils (2.6-10build1)
  command 'node' from deb nodejs (10.19.0~dfsg-3ubuntu1)
  command 'tcode' from deb emboss (6.6.0+dfsg-7ubuntu2)

Try: sudo apt install <deb name>

I have give this type of error in wsl when I type code .

samanthika-137:~/repos/wams$ code .

Command 'code' not found, did you mean:

  command 'cde' from deb cde (0.1+git9-g551e54d-1.1build1)
  command 'cdde' from deb cdde (0.3.1-1build1)
  command 'ode' from deb plotutils (2.6-10build1)
  command 'node' from deb nodejs (10.19.0~dfsg-3ubuntu1)
  command 'tcode' from deb emboss (6.6.0+dfsg-7ubuntu2)

Try: sudo apt install <deb name>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

抚你发端 2025-02-17 12:01:47

由于窗口更新和断开连接而引起的这个问题。
我已经完成了这些步骤

  1. 转到Ubuntu Home Directory并删除。 vscode-server

  2. 然后转到设置 - &gt;应用 - &gt;搜索ubuntu-&gt;转到高级选项 - &gt;重置 - &gt;维修

  1. 进行运行并键入service.msc

“在此处输入图像说明”

  1. 转到lxsssmanager,然后右键单击并重新启动

  2. 现在转到Ubuntu终端并键入代码。
    它将下载vs代码,并且有效

This issue caused because of window update and disconnect.
I have done these steps

  1. Go to ubuntu home directory and delete . vscode-server
    enter image description here

  2. Then go to setting -> Apps -> search ubuntu->go to advanced options -> Reset -> Repair

enter image description here

  1. The go to run and type service.msc

enter image description here

  1. Go to LxssManager and right click and restart
    enter image description here

  2. Now go to the ubuntu terminal and type code .
    It will download vs code and it works

心的位置 2025-02-17 12:01:47

重新安装Ubuntu软件:

sudo apt install gnome-software

清洁缓存:

sudo apt clean

更新和升级:

sudo apt update

reinstall Ubuntu Software:

sudo apt install gnome-software

Clean the Cache:

sudo apt clean

update and upgrade:

sudo apt update
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文