gpt4 book ai didi

node.js - 在 centos6 上配置 gcc-4.8.5 以包含 GLIBCXX_3.4.20

转载 作者:行者123 更新时间:2023-12-04 19:37:31 27 4
gpt4 key购买 nike

大家好,我几天来一直在寻找解决这个问题的方法,但是网上发布的方法都没有对我有用。基本上我正在尝试安装 NodeGit我的生产服务器上的库 ( centos-release-6-8.el6.centos.12.3.x86_64 )。做npm install引发以下错误:

Error: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/app/node_modules/nodegit/build/Release/nodegit.node)
at Error (native)
at Object.Module._extensions..node (module.js:434:18)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/app/node_modules/nodegit/dist/nodegit.js:11:12)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
]
killed: false,
code: 1,
signal: null,
cmd: '/bin/sh -c node /home/app/node_modules/nodegit/dist/nodegit.js' }

strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX给出:
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_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH

所以 GLIBCXX_3.4.20不见了。运行 gcc -v给出:
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/packages/encap/gcc-4.8.5/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.5/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.8.5/configure --enable-languages=c,c++,fortran --enable-shared --disable-libstdcxx-pch --enable-lto --enable-libgomp --enable-__cxa_atexit --enable-tls --with-gmp --with-mpfr --with-mpc --with-libelf
Thread model: posix
gcc version 4.8.5 (GCC)

有些地方建议我在 this 之后安装 gcc-4.9 .但它根本不起作用,因为在生产服务器中我必须通过主机管理工具(Roller)安装 gcc,这很麻烦,我想避免这样做。

你们知道安装 GLIBCXX_3.4.20 的任何方法吗?

最佳答案

GLIBCXX_3.4.20在 GCC-4.9 ( reference ) 中添加。

Some places suggest I install gcc-4.9 following this . But it simply doesn't work because in the production server I have to install gcc through a host management tool(Roller) which is a pain in the ass and I want to avoid doing that.



不知怎的,你 必须获取 libstdc++.so.6来自 GCC-4.9.x (或更高版本)到生产服务器上,并在您的二进制文件可以找到它的地方。

如果您不想使用 Roller,请按照您喜欢的任何其他方式进行操作。

关于node.js - 在 centos6 上配置 gcc-4.8.5 以包含 GLIBCXX_3.4.20,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38726387/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com