在CentOS上更新node.js时出现GLIBC_2.7错误 [英] GLIBC_2.7 error updating node.js on CentOS

查看:1463
本文介绍了在CentOS上更新node.js时出现GLIBC_2.7错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更新服务器上安装的节点版本。在那之前的版本是0.2.5或类似的东西,所以它是相当老。我是新来的这一面的事情,所以如果这是一个愚蠢的问题,我与我裸体。经过一些阅读,我发现执行 n stable 会安装最新版本的Node。在它应该安装,现在当我输入节点-V ,控制台返回:

I am trying to update the version of Node installed on a server. The version that was on there prior was 0.2.5 or something like that, so it was quite old. I'm new to this side of things, so bare with me if it's a silly issue. After some reading around I found that executing n stable would install the latest version of Node. Upon it's supposed installation, and now when I enter node -V, the console returned:


节点:/lib/libc.so.6:未找到版本`GLIBC_2.7'(节点需要)

node: /lib/libc.so.6: version `GLIBC_2.7' not found (required by node)

所以现在我需要弄清楚如何解决这个问题。我发现描述安装的页面,但文章说,以确保您编译特定于服务器体系结构的文件。我不知道如何验证我的,最后一件事我想做的是botch安装32位64位或反之亦然。

So now I need to figure out how to fix that. I found a page describing installation, but the article says to make sure that you compile the files specific to the server architecture. I'm not sure how to verify mine, and the last thing I want to do is botch something installing 32bit over 64bit or vice-versa.

有没有人有一个替代方法来修正这个问题,或者一些关于验证我的服务器架构的建议,以便我可以继续安装?

Does anybody have an alternate method of fixing this issue overall, or some suggestions on verifying my server architecture so I can proceed with installation?

推荐答案

对于任何人谁遇到这个问题,显然的问题是,我运行Centos 5.2,它随着python 2.4。要能够通过 npm 更新成功,您需要更高版本的python。而不是通过 npm ,我做了以下操作:

For anybody who comes across this, apparently the issue is that I am running Centos 5.2, which comes stock with python 2.4. To be able to update successfully via npm you need a higher version of python. Instead of going via npm I did the following:

要创建Python 2.7和2.4的替代安装, 此处的说明:

To create an alternate install of Python 2.7 alongside 2.4, follow the instructions here:

# cd /opt
# wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
# tar -xf Python-2.7.3.tgz
# cd Python-2.7.3
# yum install gcc
# ./configure
# make
# make altinstall

不要在2.4以上安装2.7,因为显然导致一系列操作系统的功能停止加工。这是 altinstall 的功能。

Don't install 2.7 over 2.4, because apparently that causes a bunch of features of the OS to stop working. This is the function of altinstall.

对于节点本身的安装, wget 在这些说明是旧的,因此请按照这些说明

For the installation of node itself, the wget in those instructions is old, so follow these instructions:

# mkdir ~/sources
# cd ~/sources
# wget http://nodejs.org/dist/node-latest.tar.gz
# tar zxvf node-latest.tar.gz
# cd node-v<TAB>
# python2.7 ./configure
# make
# make install
# mv /root/sources/node-v0.10.1/out/Release /opt/node-v0.10.1
# ln -s /opt/node-v0.10.1/node /usr/bin/node

确保在最后两个步骤中通过node-latest-tar.gz替换安装的版本号。还要注意,原始指令不包括 ./ configure 之前的 python2.7 ,但代码不会否则,假设你按照第一部分创建python 2.7的 altinstall

Be sure to replace the version number in the last two steps with whichever one was installed via node-latest-tar.gz. Also note that the original instructions don't include python2.7 before ./configure, but the code will not function otherwise, assuming you followed the first part to create the altinstall of python 2.7

这篇关于在CentOS上更新node.js时出现GLIBC_2.7错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆