Search code examples
visual-studio-codeubuntu-18.04i386

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


I get the below error while trying to install Visual Studio Code on Ubuntu 18.04 32bit:

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

VSCode Installation Error


Solution

  • Since VS Code started using Electron 4.x+, it does not anymore run on Linux 32-bit.

    It starts with this ticket in VS Code's Github issue:
    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

    Following that blog post from Electron:
    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.

    That is why the snap store only provides an amd64 installation.

    enter image description here

    This upgrade to Electron 4.x was mentioned in VS Code's release for 1.36.
    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.

    So.. your only option is to use an older version before 1.36.
    Start with the 1.35 release:
    https://code.visualstudio.com/updates/v1_35