node.js /lib64/libc.so.6:未找到版本“GLIBC_2.14”。为什么我收到这个错误?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/50564999/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
/lib64/libc.so.6: version `GLIBC_2.14' not found. Why am I getting this error?
提问by user1187
I am working in node js. I have installed hummus package. It installed properly. I am using this package for modifying the pdf files. While downloading the pdf I am calling hummus. Onclick of download I am getting this error.
我在节点 js 中工作。我已经安装了 hummus 包。它安装正确。我正在使用这个包来修改 pdf 文件。在下载 pdf 时,我打电话给鹰嘴豆泥。Onclick 下载我收到此错误。
Error: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /var/www/html/node_modules/hummus/binding/hummus.node)
at Object.Module._extensions..node (module.js:681:18)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/var/www/html/node_modules/hummus/hummus.js:5:31)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at /var/www/html/app/routes.js:2250:18
at Layer.handle [as handle_request] (/var/www/html/node_modules/express/lib/router/layer.js:95:5)
With the help of this linkI have updated glibc. But still I am getting the same error. Please help me to find out the issue. I am using CentOs 6.9
在此链接的帮助下,我更新了 glibc。但我仍然遇到同样的错误。请帮我找出问题所在。我正在使用 CentOs 6.9
回答by Abhishek Singh
You need to install glibc alongside your current installation of glibc as you cannot update to glibc 2.14 directly in centos 6.x safely. Follow the steps below to install glibc 2.14:
您需要在当前安装 glibc 的同时安装 glibc,因为您无法直接在 centos 6.x 中安全地更新到 glibc 2.14。按照以下步骤安装 glibc 2.14:
mkdir ~/glibc214cd ~/glibc214wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gztar zxvf glibc-2.14.tar.gzcd glibc-2.14mkdir buildcd build../configure --prefix=/opt/glibc-2.14make -j4sudo make installexport LD_LIBRARY_PATH=/opt/glibc-2.14/lib(for current login session) OR addLD_LIBRARY_PATH=/opt/glibc-2.14/libin the /etc/environment and performsource /etc/environment(to add env variable permanently)
mkdir ~/glibc214cd ~/glibc214wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gztar zxvf glibc-2.14.tar.gzcd glibc-2.14mkdir buildcd build../configure --prefix=/opt/glibc-2.14make -j4sudo make installexport LD_LIBRARY_PATH=/opt/glibc-2.14/lib(对于当前登录会话)或添加LD_LIBRARY_PATH=/opt/glibc-2.14/lib到 /etc/environment 并执行source /etc/environment(以永久添加 env 变量)
回答by 11AND2
Ok, I can not reproduce this error. However, this could work:
好的,我无法重现此错误。但是,这可以工作:
Download the whole hummusjs package from the author https://github.com/galkahana/HummusJS(e. g. as zip).
Add a new scripts entry in its package.json:
"rebuild": "node-pre-gyp rebuild".cd into the package folder at your desktop and run "npm install".
For safety delete the .binding and .build folder.
Edit the binding.gyp file in the package (new section before 'sources'):
], #added by 11AND2 "conditions": [ [ 'OS=="linux"', { "cflags": ["-include gcc-preinclude.h"] } ]], #end added by 11AND2 'sources': [Then run
npm run rebuildand wait :-)Try the example which failed and report back. You can also execute
npm run testto run the module test cases.
从作者https://github.com/galkahana/HummusJS下载整个 hummusjs 包(例如 zip)。
在它的 package.json: 中添加一个新的脚本条目
"rebuild": "node-pre-gyp rebuild"。cd 进入桌面上的包文件夹并运行“npm install”。
为了安全起见,删除 .binding 和 .build 文件夹。
编辑包中的 binding.gyp 文件('sources' 之前的新部分):
], #added by 11AND2 "conditions": [ [ 'OS=="linux"', { "cflags": ["-include gcc-preinclude.h"] } ]], #end added by 11AND2 'sources': [然后运行
npm run rebuild并等待:-)尝试失败的示例并返回报告。您还可以执行
npm run test以运行模块测试用例。

