code-server icon indicating copy to clipboard operation
code-server copied to clipboard

Check /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20', `GLIBCXX_3.4.21' by default

Open mengjuleu opened this issue 7 years ago • 24 comments

Description

In 1.408-vsc1.32.0, it seems code-server check GLIBCXX_3.4.20 and GLIBCXX_3.4.21 before anything starts. Therefore, it's almost impossible to run code-server in CentOS 7. We can run code-server 1.32.0-310 by replacing spdlog.node in $HOME/.local/share/code-server/dependencies. Is there any similar way in 1.408-vsc1.32.0?

mengjuleu avatar Mar 27 '19 04:03 mengjuleu

I followed all of @enniosousa 's steps. rpm -ivh or yum install still cant find resolve this dependency. Added /usr/lib64 to $LD_LIBRARY_PATH as well.

strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX

gives me

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25

Error:

Error: Package: bazel2-2.0.0-2.el7.x86_64 (/bazel2-2.0.0-2.el7.x86_64)
           Requires: libstdc++.so.6(GLIBCXX_3.4.22)(64bit)
Error: Package: bazel2-2.0.0-2.el7.x86_64 (/bazel2-2.0.0-2.el7.x86_64)
           Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
Error: Package: bazel2-2.0.0-2.el7.x86_64 (/bazel2-2.0.0-2.el7.x86_64)
           Requires: libstdc++.so.6(GLIBCXX_3.4.23)(64bit)

anishagartia avatar Jun 13 '20 01:06 anishagartia

@anishagartia This is the issue tracker for code-server, not bazel.

nhooyr avatar Jun 13 '20 01:06 nhooyr

Hello!

I was able to install on CentOS

I have a server with CentOS Linux release 7.6.1810 (Core) arch x86_64 and I finally make code-server works on it.

1

After follow default intalation's tutorial, when i tryed start the code-server o got this error Output

./code-server: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./code-server)
./code-server: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./code-server)

2

So I had tried check provides versions avaliable at /lib64/libstdc++.so.6 and I got the prompt bellow, and really was missing the provider GLIBCXX_3.4.20 and GLIBCXX_3.4.21 PS: /lib64 is a symbolic link to /usr/lib64

Command

strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX

Output

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_DEBUG_MESSAGE_LENGTH

3

My natural action was update the version of libstdc++ and was show up me a message tha already installed and latest version.

Command

sudo yum install libstdc++

Output

Loaded plugins: fastestmirror, replace
Repository packages-microsoft-com-prod is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: linorg.usp.br
 * epel: espejito.fder.edu.uy
 * extras: linorg.usp.br
 * remi-php72: remi.xpg.com.br
 * remi-safe: remi.xpg.com.br
 * updates: linorg.usp.br
 * webtatic: us-east.repo.webtatic.com
Package libstdc++-4.8.5-36.el7_6.1.x86_64 already installed and latest version
Nothing to do

4

I looked for a repository to CentOS 7 with updated library avaliable I had not success :(

5

So I had tried to find a library libstdc++ installed on my server; for my luck I found one used by Anaconda (a Python/R Data Science Platform)

Command

sudo find / -name "libstdc++.so.6*"

Output

/home/jorge/anaconda3/pkgs/libstdcxx-ng-8.2.0-hdf63c60_1/lib/libstdc++.so.6.0.25
/home/jorge/anaconda3/pkgs/libstdcxx-ng-8.2.0-hdf63c60_1/lib/libstdc++.so.6
/home/jorge/anaconda3/pkgs/libstdcxx-ng-8.2.0-hdf63c60_1/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.25
/home/jorge/anaconda3/pkgs/libstdcxx-ng-8.2.0-hdf63c60_1/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6
/home/jorge/anaconda3/pkgs/libgcc-7.2.0-h69d50b8_2/lib/libstdc++.so.6.0.21
/home/jorge/anaconda3/lib/libstdc++.so.6
/home/jorge/anaconda3/lib/libstdc++.so.6.0.25
/home/jorge/anaconda3/lib/libstdc++.so.6.0.21
/home/jorge/anaconda3/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6
/home/jorge/anaconda3/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.25
/usr/lib/libstdc++.so.6
/usr/lib/libstdc++.so.6.0.19
/usr/lib64/libstdc++.so.6
/usr/lib64/libstdc++.so.6.0.19
/usr/lib64/libstdc++.so.6.bkp
/usr/lib64/libstdc++.so.6.0.25
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.py
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyc
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyo
/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.19-gdb.py
/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.19-gdb.pyc
/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.19-gdb.pyo
/opt/anaconda3/pkgs/libstdcxx-ng-8.2.0-hdf63c60_1/lib/libstdc++.so.6.0.25
/opt/anaconda3/pkgs/libstdcxx-ng-8.2.0-hdf63c60_1/lib/libstdc++.so.6
/opt/anaconda3/pkgs/libstdcxx-ng-8.2.0-hdf63c60_1/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.25
/opt/anaconda3/pkgs/libstdcxx-ng-8.2.0-hdf63c60_1/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6
/opt/anaconda3/pkgs/libgcc-7.2.0-h69d50b8_2/lib/libstdc++.so.6.0.21
/opt/anaconda3/lib/libstdc++.so.6
/opt/anaconda3/lib/libstdc++.so.6.0.25
/opt/anaconda3/lib/libstdc++.so.6.0.21
/opt/anaconda3/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6
/opt/anaconda3/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.25

The library version that we need is /opt/anaconda3/lib/libstdc++.so.6.0.25 listed previously. So I copied the lib to /usr/lib64

Command

sudo cp /opt/anaconda3/lib/libstdc++.so.6.0.25 /usr/lib64/

After I mode the symbolic link /usr/lib64/libstdc++.so.6 to /usr/lib64/libstdc++.so.6.bkp

Command

sudo mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.bkp

My lastest step was create a symbolic link

Command

sudo ln -s /usr/lib64/libstdc++.so.6.0.25 /usr/lib64/libstdc++.so.6

5

Now try run the code-server

Thanks. It's work for me

hadpro24 avatar Jul 24 '20 18:07 hadpro24

Thanks a lot bro....you really saved my ass with your idea

velvet2017 avatar Sep 02 '21 22:09 velvet2017