我很难在Ubuntu19.04上安装VSCode,我找到的大多数说明都是关于在Ubuntu18.04/16.04上安装VSCode的。
首先,我尝试从Ubuntu安装VSCode。当我打开vscode之后,程序显示为空白。即使在我重新启动计算机,然后安装和重新安装VSCode时,这种情况仍在继续。
接下来,我尝试使用VSCode安装这个.deb来自VSCode网站的选项。我也遇到了同样的问题,当我打开VSCode时,我看到的只是一个空白窗口。
最后,我尝试使用snap,按照这些指示安装VSCode。同样,当我打开VSCode时,它是空的。
接下来,我尝试使用apt进行安装。我运行了snap remove vscode,并被告知它不在那里,之后我运行了“”,告诉我vscode已经是最新版本了。我认为这是因为我只卸载了我用snap安装的版本。
我浏览了一下VSCode文档,发现有时候GPU加速方面的问题会导致VSCode出现空白。我试图通过运行code --disable-gpu来禁用GPU加速,但是当我重新打开VSCode时,它又是空白的。
如何在Ubuntu19.04上安装VSCode?我的下一个计划是尝试安装edge或test构建。
我已经阅读了关于18.04上安装的问题,并按照说明进行了操作。我无法按照这些说明安装VSCode。
更新:这是来自/var/log/apt/term.log的输出,它显示了我的vs code安装尝试。
Log started: 2019-05-16 14:05:45
Selecting previously unselected package code.
(Reading database ... 176942 files and directories currently installed.)
Preparing to unpack .../code_1.33.1-1554971066_amd64.deb ...
Unpacking code (1.33.1-1554971066) ...
Setting up code (1.33.1-1554971066) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for gnome-menus (3.32.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-4ubuntu1) ...
Log ended: 2019-05-16 14:05:48
Log started: 2019-05-20 12:13:37
(Reading database ... 186403 files and directories currently installed.)
Removing code (1.33.1-1554971066) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for gnome-menus (3.32.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-4ubuntu1) ...
Log ended: 2019-05-20 12:13:37
Log started: 2019-05-20 12:13:54
Selecting previously unselected package code.
(Reading database ... 184660 files and directories currently installed.)
Preparing to unpack .../code_1.34.0-1557957934_amd64.deb ...
Unpacking code (1.34.0-1557957934) ...
Setting up code (1.34.0-1557957934) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for gnome-menus (3.32.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-4ubuntu1) ...
Log ended: 2019-05-20 12:13:57
Log started: 2019-05-20 12:35:47
(Reading database ... 186403 files and directories currently installed.)
Removing code (1.34.0-1557957934) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for gnome-menus (3.32.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-4ubuntu1) ...
Log ended: 2019-05-20 12:35:47
Log started: 2019-05-20 12:38:15
Selecting previously unselected package code.
(Reading database ... 184660 files and directories currently installed.)
Preparing to unpack .../code_1.34.0-1557957934_amd64.deb ...
Unpacking code (1.34.0-1557957934) ...
Setting up code (1.34.0-1557957934) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for gnome-menus (3.32.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-4ubuntu1) ...
Log ended: 2019-05-20 12:38:18
Log started: 2019-05-20 12:49:21
(Reading database ... 186403 files and directories currently installed.)
Removing code (1.34.0-1557957934) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for gnome-menus (3.32.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-4ubuntu1) ...
Log ended: 2019-05-20 12:49:21
Log started: 2019-05-20 21:37:40
(Reading database ... 186403 files and directories currently installed.)
Removing code (1.34.0-1557957934) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for gnome-menus (3.32.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-4ubuntu1) ...
Log ended: 2019-05-20 21:37:40另一个最新消息:我解决了这个问题。我重复了前面关于卸载VSCode的所有步骤,我还检查了/etc/apt/sources.list.d这个目录包含了一些VSCode的配置文件,我删除了这些文件。我还检查了主目录中的.config目录,它还包含一些vscode配置,我将其删除。在完成了VSCode相关文件的完整处理之后,我从.deb网站下载了VSCode文件,并使用Ubuntu的软件安装程序安装了它。成功!
发布于 2019-07-08 14:17:00
在终端中尝试以下命令:
sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt install codehttps://askubuntu.com/questions/1144924
复制相似问题