20

In trying to download vscode from the Ubuntu software application, I ran into the following error:

Detailed errors from the package manager follow:
 snapd returned status code 400: Bad Request

After Googling this error I took the advice given by this following link:

When I try to install vscode, snapd returns error code 400

which led me to running the following command in my terminal:

snap install vscode --classic

That command worked and all, but now I can't find where and how to start vscode on my machine.

Anyone have any tips?

qxh5696
  • 201
  • According to https://askubuntu.com/a/917290/158442, classic mode snaps are installed to your home directory. – muru Oct 17 '17 at 01:49
  • @muru I've looked there already and I don't see a vscode sub directory – qxh5696 Oct 17 '17 at 01:57
  • Looks like it's wrong. I run sudo snap install vscode --classic, and it was installed to /snap, and since /snap/bin is in my PATH, I could just run vscode in a terminal. It also showed up in the Dash after that. – muru Oct 17 '17 at 02:03
  • That other answer says the extensions will be in your home dir. Probably in the snap dir. – kyrofa Oct 17 '17 at 02:40

3 Answers3

17

I added /snap/bin to $PATH. That worked for opening VS Code from the CLI.

2

After sudo snap install vscode --classic, I'm able to start up VS Code by searching 'code' in the Dash and clicking on the Launcher item that comes up (if this isn't working (note that it might take a while for VS Code to start up), make a topic on the issue here and tag wimpress in your post or email the address in the contact field of snap info vscode).

You can also start VS Code with snap run vscode.

Ads20000
  • 1,963
1

Using CentOS7.9, I was able to install it as (root user) and start it using:

        # install snap tool:
        yum install snapd -y
        systemctl enable --now snapd.socket
        ln -s /var/lib/snapd/snap /snap
        # install Visual Studio Code through Snap:
        snap install code --classic

Start vscode: snap run code

karsten
  • 179
  • 1
  • 6