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?
apt-get install software-properties-common
add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update
apt-get upgrade
apt-get install gcc-4.9
apt-get upgrade libstdc++6
Have you changed the dockerfile?
@JavanTang I used CentOS 7
@mengjuleu You can use yum to install apt and then use those commands. I have not tried it, just give a way.
@JavanTang That is least effective way to do it in any other distro than Ubuntu. I have for example a Debian Jessie (Debian 8) and solution provided by you won't work at all.
Seems that the binary itself needs that glibc version now.
It would be nice if the binaries were actually built on CentOS (or a different flavour of linux with older GCC) so CentOS users could also use code-server.
The docker implementation is nice, but it's not great for long-lived usage.
Was genuinely excited about this until I discovered that it wouldn't run on CentOS 7. Such a shame. Hopefully a binary compiled for people who dare to not use Ubuntu will become available :wink:
Well, I finally found a way. I compiled and installed gcc 8.3 on my CentOS 7 box. Then create symLink to the newer libstdc++.so.6 under /lib64 so that code-server can pick up the newer version of c++ lib.
BTW, compiling code-server on CentOS 7 box won't help, it'll still show the same error message when launching.
Linking with g++ -static-libgcc -static-libstdc++ may help.
It seems that in the most recent binary drop, the environment is not passed correctly when creating the shared process. This causes LD_LIBRARY_PATH to not be passed, which results into the error message related to GLIBCXX_3.4.20 if you're running on CentOS 7.
It worked fine with the v1.31.1-100 binary drop.
When doing a strace -ff, you will see:
strace.pid.14450:execve("....../code-server/code-server", ["..../code-ser"..., "/home/travis/build/codercom/code"..., "--bootstrap-fork", "vs/code/electron-browser/sharedP"..., "--extra-args", "[]", "--data-dir", "......./.local/share/code-ser"...], [/* 3 vars */]) = 0
So, only 3 variables are passed as environment to execve syscall, while I have 159 in my environment...
@mischajonker Yeah, I found the same thing. So, the shared process cannot catch up LD_LIBRARY_PATH env var. So, I still need to create symLink lin /lib64 which is dangerous.
... and not to mention that creating a symLink in /lib64 requires root, which I don't have. Perhaps we need to change this issue from "question" to "bug".
... and not to mention that creating a symLink in /lib64 requires root, which I don't have. Perhaps we need to change this issue from "question" to "bug".
I agree, it looks like it have effected all centos users. :( i dont want to change os just to get this to work :(
... and not to mention that creating a symLink in /lib64 requires root, which I don't have. Perhaps we need to change this issue from "question" to "bug".
Also urgent label.
I had the same problem on debian jessie, i think i fixed it by adding -D_GLIBCXX_USE_CXX11_ABI=0to the "cflags" in code-server/packages/protocol/node_modules/spdlog/build/config.gypi
...
3 "target_defaults": {
4 "cflags": ["-D_GLIBCXX_USE_CXX11_ABI=0"],
5 "default_configuration": "Release",
...
but got the SyntaxError: Unexpected end of JSON input error now
Linking with
g++ -static-libgcc -static-libstdc++may help.
Could you give us a sample command?
Hello!
I have a server with CentOS Linux release 7.6.1810 (Core) arch x86_64 and I finally make code-server works on it.
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)
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
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
I looked for a repository to CentOS 7 with updated library avaliable I had not success :(
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
Now try run the code-server
@enniosousa How do you get /opt/anaconda3/lib/libstdc++.so.6.0.25 in CentOS? I guess you compile and install newer gcc by yourself, right?
@mengjuleu the /opt/anaconda3/lib/libstdc++.so.6.0.25 is part of Anaconda . A colleague had installed before I try run code-server, so wasn't me that has compiled and installed.
I asked to him. He told me that had downloaded the Anaconta Python 3.7 version and installed manually
Duplicate of https://github.com/codercom/code-server/issues/239
I resolved this issue by install gcc-9.1.0 (gcc-9.1.0.tar.gz) manually in CentOS 7.
https://gcc.gnu.org/mirrors.html
My version: code-server1.1156-vsc1.33.1-linux-x64
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 This is the issue tracker for code-server, not bazel.
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.6and I got the prompt bellow, and really was missing the providerGLIBCXX_3.4.20andGLIBCXX_3.4.21
PS:/lib64is a symbolic link to/usr/lib64Command
strings /usr/lib64/libstdc++.so.6 | grep GLIBCXXOutput
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_LENGTH3
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 do4
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.25The library version that we need is
/opt/anaconda3/lib/libstdc++.so.6.0.25listed previously. So I copied the lib to/usr/lib64Command
sudo cp /opt/anaconda3/lib/libstdc++.so.6.0.25 /usr/lib64/After I mode the symbolic link
/usr/lib64/libstdc++.so.6to/usr/lib64/libstdc++.so.6.bkpCommand
sudo mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.bkpMy lastest step was create a symbolic link
Command
sudo ln -s /usr/lib64/libstdc++.so.6.0.25 /usr/lib64/libstdc++.so.65
Now try run the code-server
Thanks. It's work for me
Most helpful comment
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
2
So I had tried check provides versions avaliable at
/lib64/libstdc++.so.6and I got the prompt bellow, and really was missing the providerGLIBCXX_3.4.20andGLIBCXX_3.4.21PS:
/lib64is a symbolic link to/usr/lib64Command
Output
3
My natural action was update the version of
libstdc++and was show up me a message tha already installed and latest version.Command
Output
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
Output
The library version that we need is
/opt/anaconda3/lib/libstdc++.so.6.0.25listed previously. So I copied the lib to/usr/lib64Command
After I mode the symbolic link
/usr/lib64/libstdc++.so.6to/usr/lib64/libstdc++.so.6.bkpCommand
My lastest step was create a symbolic link
Command
5
Now try run the code-server