如何编译 node.js for CentOS 6.10 (库问题)
How to compile node.js for CentOS 6.10 (library issues)
我正在尝试让最新版本的节点(目前为 12.1.0)在 CentOS 6.10 盒子上运行。 这是一个问题,因为标准的 CentOS 二进制文件已过时;例如:
./node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ./node)
(a number of other references like this also appear)
当我尝试安装和运行二进制文件时,g++/c ++工具已过时。 但是我决定尝试从源代码编译,如果我能让工具正确对齐的话。
我已经从 CERN devtools(http://linux.web.cern.ch/linux/devtoolset)获得了编译器工具的更新版本,并且似乎已经正确安装了它们。 我从网络上的各个地方得到的是,在进行配置之前,我需要导出指向这些新库的指针,例如:
export CC=/opt/rh/devtoolset-2/root/usr/bin/gcc
export CPP=/opt/rh/devtoolset-2/root/usr/bin/cpp
export CXX=/opt/rh/devtoolset-2/root/usr/bin/c++
这些确实具有更新和足够现代的版本,例如,
/opt/rh/devtoolset-2/root/usr/bin/c++ --version
c++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
但他们似乎没有进入配置过程:
[root@linux2 node-v12.1.0]# ./configure --prefix=/opt/node-12.1.0
WARNING: C++ compiler too old, need g++ 6.3.0 or clang++ 8.0.0 (CXX=/opt/rh/devtoolset-2/root/usr/bin/c++)
INFO: Using floating patch "tools/icu/patches/64/source/common/putil.cpp" from "tools/icu"
INFO: Using floating patch "tools/icu/patches/64/source/i18n/dtptngen.cpp" from "tools/icu"
WARNING: warnings were emitted in the configure phase
INFO: configure completed successfully
当我交叉手指并尝试make
时,我得到了一大堆编译结果,然后是一堆错误,为了简洁起见,这里(暂时)省略了。
无论如何:它只是不起作用。 谁能看到这里发生了什么,以及我如何把事情做好? 谢谢!
你需要一个更新的开发工具集,6 或 7 而不是 2。此链接应该会有所帮助。并按照建议使用scl
,而不是自己设置 env var。
相关文章:
- 警告处理为错误这里有什么问题
- 最小硬币更换问题(自上而下方法)
- 为"adjacent"变量赋值时出现问题
- 我的神经网络不起作用 [XOR 问题]
- 在Ubuntu 16.04上安装Cilk时出现问题
- C++我的数学有什么问题,为什么我的代码不能正确循环
- 编译包含字符串的代码时遇到问题
- Project Euler问题4的错误解决方案
- 问题:什么是QAbstractItemView::NoEditTriggers的反面
- 在编译C++代码(具有dlib和opencv)到WASM时面临问题
- 在进程中对同一管道进行读取和写入时C++管道出现问题
- 静态数据成员的问题-修复链接错误会导致编译器错误
- C++ 雷神库 - 使用资源加载器类时出现问题(不命名类型)
- 一个关于在C++中重载布尔运算符的问题
- 首要问题的答案让值班员搞错了
- setlocale的C++土耳其字符串问题
- 如何重构类层次结构以避免菱形问题
- 基于boost的程序的静态链接——zlib问题
- 如何编译 node.js for CentOS 6.10 (库问题)
- 在CentOS 7 x64上编译QT时,如何解决矛盾的库问题