Carlos Sanchez
Carlos Sanchez

Reputation: 11

Visual-Studio-Code vscode-server not installing correctly in Ubuntu 22.04 Server by Remote-SSH Extension

I am trying to connect from VSCode 1.92.2 through Remote-SSH Extension V0.11 to my Ubuntu 22.04 LTS server but process fails and connection is cancelled after attempting to install vscode-server which appears to be an incomplete install.

The .vscode-server log at the Remote Host indicates the server doesn't meet requirements:

2024-08-27 12:09:24] error This machine does not meet Visual Studio Code Server's prerequisites, expected either...

  • find libstdc++.so or ldconfig for GNU environments
  • find /lib/ld-musl-x86_64.so.1, which is required to run the Visual Studio Code Server in musl environments

However, searching for the referenced libraries in the remote host using "locate" and "ldconfig" commands under root user, seems to show they are installed:

:# locate libstdc++.so

/usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so

:# ldconfig -p |grep libstdc++.so

libstdc++.so.6 (libc6,x86-64) => /lib/x86_64-linux-gnu/libstdc++.so.6

:# locate ld-musl-x86_64.so.1

/usr/lib/ld-musl-x86_64.so.1

:# ldconfig -p |grep musl

ld-musl-x86_64.so.1 (libc6,x86-64) => /lib/ld-musl-x86_64.so.1

After searching online for posts related to this issue, it was suggested to downgrade VSCode below version 1.86. But downgrading to 1.85.2 did not help so I went back to latest release 1.92.2.

If I try to connect to the host from OpenSSH client (outside of VSCode), I am able to connect without any problems and VSCodeseems to connect but losses the connection upon trying to install vscode-server code.

Upvotes: 1

Views: 183

Answers (1)

Carlos Sanchez
Carlos Sanchez

Reputation: 11

I guess I found the issue preventing VSCode from properly installing the server code in the Remote Host and running the remote CLI's.

The Remote Host User was chrooted or jailed, causing the VSCode check-requirements.sh script to fail thinking that server did not meet requirements.

Chrooted user could not see files outside the jail hence the failure of the requirements.sh script.

After I removed the user from the jail, the requirements.sh returned with 0 code and I was able to connect to the Remote Host from VSCode.

Upvotes: 0

Related Questions