ubuntu-14.04 - Visual Studio Code 无法通过命令行打开

标签 ubuntu-14.04 visual-studio-code

我已经在我的机器上安装了 Visual Studio Code。
它在安装后工作得很好。

但是自从我重新启动计算机后,当我在终端中键入命令“代码”时,它就无法打开。

当我键入打开 Visual Studio 的命令时,没有任何 react 。
但是如果我输入

which code

它返回给我/usr/bin/code , 这样程序就安装好了。即使我使用 sudo,编辑器也不会打开。

我正在使用 Ubuntu 14.04 LTS 我使用 .deb package offered 安装了程序here
有什么建议么?

编辑

我试图创建一个指向安装路径的符号链接(symbolic link)。但现在我得到了错误:
andre@andre-Lenovo-G40-80:~$ sudo ln -s /usr/share/code/code /usr/local/bin/code
andre@andre-Lenovo-G40-80:~$ which code
    /usr/local/bin/code
andre@andre-Lenovo-G40-80:~$ code
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
Error: watch /home/andre/.config/Code/User ENOSPC
at exports._errnoException (util.js:890:11)
at FSWatcher.start (fs.js:1323:19)
at Object.fs.watch (fs.js:1351:11)
at r.e.registerWatchers (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:8:16692)
at r.e (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:8:15951)
at new r (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:8:19184)
at v (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:4:15395)
at t._createInstance (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:7:23640)
at t._createAndCacheServiceInstance (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:7:24615)

最佳答案

您可能达到了 inotify 的限制。 watch 。注意这个错误:

Error: watch /home/andre/.config/Code/User ENOSPC

然后看问题Node.js: what is ENOSPC error and how to solve? .解决的本质是增加fs.inotify.max_user_watches系统控制值。

关于ubuntu-14.04 - Visual Studio Code 无法通过命令行打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38055176/

相关文章:

linux - 在专用主机上安装 Apache 服务器

python - 无法在 ubuntu 13.04 上安装 PIL

android - "ionic build android "给出 ANDROID_HOME 错误

c - 一次从二进制文件中读取 2 个字节

node.js - 我可以使用 VSCode 在本地运行/调试 Heroku Node.js 应用程序吗?

asp.net-mvc - 如何使用Visual Studio代码在ASP.NET Core中添加ASP.NET身份

typescript - 如何像在 WebStorm 中一样轻松地导航到 VS Code 中的接口(interface)实现?

apache - 针对 ARM 问题交叉编译 Apache

c++ - 什么是 C++ 和 VScode 中的#pragma 区域?

docker - 使用 Xdebug 作为调试器在 Docker 容器上使用 VSCode 调试 Laravel