Visual Studio Ubuntu18.04 32 位上的代码安装错误:"snap "代码“对于此架构 (i386) 在稳定版上不可用”

Visual Studio Code installation error on Ubuntu18.04 32-bit: "snap "code" is not available on stable for this architecture (i386)"

我在 Ubuntu 18.04 32 位上尝试安装 Visual Studio 代码时出现以下错误:

error: snap "code" is not available on stable for this architecture (i386)
       but exists on other architectures (amd64).

自从 VS Code 开始使用 Electron 4.x+,它不再 运行 在 Linux 32 位上。

它从 VS Code 的 Github 问题中的这张票开始:
Electron 4.0.x does not run on 32bit Linux

Closing as designed, with Electron 4 we will no longer support Linux 32bits. See https://electronjs.org/blog/linux-32bit-support

关注来自 Electron 的博客 post:
Discontinuing support for 32-bit Linux:

The Electron team will discontinue support for 32-bit Linux (ia32 / i386) starting with Electron v4.0. The last version of Electron that supports 32-bit based installations of Linux is Electron v3.1, which will receive support releases until Electron v6 is released.

这就是为什么 snap 商店只提供 amd64 安装的原因。

在 VS Code 的 1.36 版本中提到了对 Electron 4.x 的升级。
https://code.visualstudio.com/updates/v1_36#_linux-32bit-support-ends

With this release, we move to Electron version 4.x, which means that VS Code will no longer run on Linux 32-bit. Please update to a 64-bit version of VS Code.

所以..你唯一的选择是使用旧版本 before 1.36.
从 1.35 版本开始:
https://code.visualstudio.com/updates/v1_35