uab-cgds-worthey / learnings_journal

Tips and tricks we learn at CGDS to get stuff working
3 stars 0 forks source link

VSCode remote tunnel creation fails with GLIBC version related error #4

Closed ManavalanG closed 9 months ago

ManavalanG commented 9 months ago

Initiating remote tunnel resulted in error:

*
* Visual Studio Code Server
*
* By using the software, you agree to
* the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
* the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
*
[2024-02-05 11:08:49] error This machine does not meet Visual Studio Code Server's prerequisites, expected either...:   - find GLIBC >= v2.28.0 (but found v2.17.0 instead) for GNU environments
  - find /lib/ld-musl-x86_64.so.1, which is required to run the Visual Studio Code Server in musl environments
ManavalanG commented 9 months ago

VSCode CLI was recently updated to require glibc >=2.28, and this was the cause of the above error. See here for heated conversation on this topic.

I attempted the solutions suggested there:

  1. Upgrade glibc to version >=2.28. This didn't work for me though when I loaded module GLib/2.75.0-GCCcore-12.2.0. Glibc version was still 2.17 as shown here:
$ ldd --version ldd
ldd (GNU libc) 2.17
  1. Downgrade vscode cli to 1.85. Used the code below and remote tunnel worked as expected for me.
curl -Lk 'https://update.code.visualstudio.com/1.85.2/cli-alpine-x64/stable' --output vscode_cli.tar.gz
tar -xf vscode_cli.tar.gz
# move it to bin dir
mv code /home/$USER/bin
ManavalanG commented 9 months ago

I upgrade vscode on my mac to 1.86 without thinking about it, and it had trouble connecting to cheaha tunnel due to errors similar to the one mentioned above. Downgrading to 1.85.2 fixed the problem.

It probably is a good idea to find ways to satisfy Glibc version requirements instead of sticking to the older version of vscode. Will need to look into this at some point.

ManavalanG commented 3 months ago

VScode and remote tunneling now works, albeit it is an intermediate fix until Feb 2025. As per their docs:

Can I run VS Code Server on older Linux distributions?

Starting with VS Code release 1.86.1 (January 2024), the minimum requirements for the build toolchain of the remote server were raised. The prebuilt servers distributed by VS Code are compatible with Linux distributions based on glibc 2.28 or later, for example, Debian 10, RHEL 8, or Ubuntu 20.04. VS Code will still allow users to connect to an OS that is not supported by VS Code (OS that does not provide glibc >= 2.28 and libstdc++ >= 3.4.25) until February 2025. This allows time for you and your companies to migrate to newer Linux distributions. VS Code will show a dialog and banner message when you connect to an OS version that is not supported by VS Code.

I tested using vscode v1.92.1 (both desktop as well as remote CLI) and it worked. It does show a warning message saying "You are connected to an OS version that is not supported by VS Code"