lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

I'm using VSCode on my CentOS 7 and have installed the Lua plugin. However, the following error occurs. How should I set up the configuration?

Open imLaoYang opened this issue 11 months ago • 4 comments

Image

Image

Image

imLaoYang avatar Feb 18 '25 02:02 imLaoYang

glibc version issue

CppCXY avatar Feb 18 '25 03:02 CppCXY

CentOS 7's glibc version is 2.17, while the Linux virtual machine provided by GitHub is Ubuntu, which generally has a higher glibc version.

CppCXY avatar Feb 18 '25 03:02 CppCXY

I noticed that you used sniper00's moon repository. I can tell you that the author himself is also using Emmylua; however, the default Emmylua on the Linux distribution of VSCode does not support glibc 2.17, but you can download it yourself.

CppCXY avatar Feb 18 '25 03:02 CppCXY

I'm currently facing a similar issue with my Ubuntu 20.04 installation as the current build target for lua-language-server has moved to Ubuntu 22.04 which has a higher glibc version.

I'm unable to update my Ubuntu version as a legacy project I'm working on is using the same glibc version as Ubuntu 20.04 and I still need my tooling to work.

I was able to fix the vscode extension by building lua-language-server from source using this guide.

Once I was able to build the latest version of the server, I just copied and pasted the bin folder from the lua-language-server directory to the sumneko.lua-*-linux-x64/server directory where the * denotes the installed version of the vscode extension.

You can search/prompt for where your extensions are installed pretty easily but it would typically be in the ~/.vscode/extensions or ~/.vscode-server/extensions if you are using a WSL2 instance like what I'm using.

I've turned off auto update for the extension and will manually update when needed.

Leaving this here to help whoever that might need to use the extension on older OS versions like my niche case.

vickean avatar Jul 03 '25 15:07 vickean