本文最后更新于 228 天前,其中的信息可能已经有所发展或是发生改变。
如下报错:
[root@localhost ~]# code-server
/usr/lib/code-server/lib/node: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by /usr/lib/code-server/lib/node) /usr/lib/code-server/lib/node: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.20' not found (required by /usr/lib/code-server/lib/node)
/usr/lib/code-server/lib/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/code-server/lib/node)
原因是CentOS7不支持高版本的libstdc++需要升级CentOS8,所以如果要在CentOS7上使用,则需要回退code-server版本,退到4.16.1版本即可。测试4.16.1是最后一个CentOS7支持的code-server。Github:Release v4.16.1 · coder/code-server (github.com)
# 查询已安装code-server的rpm包
[root@localhost ~]# rpm qa | grep code-server
code-server-4.20.0-1.x86_64
# 卸载code-server-4.20.0
[root@localhost ~]# rpm -e code-server-4.20.0-1.x86_64
# 安装code-server-4.16.1-amd64.rpm
[root@localhost ~]# rpm -ivh code-server-4.16.1-amd64.rpm
准备中... ################################# [100%]
正在升级/安装...
1:code-server-0:4.16.1-1 ################################# [100%]