【新人提问】linux的二进制版本肿么玩?
发布于 2年前 作者 xuhaijinsky2008 2221 次浏览

node官网上可以下载linux的二进制版本Linux Binaries (.tar.gz),这个版本下载下来在linux上解压后,怎么运行啊? 到解压后的bin下面直接运行node不行: [gimap[[[[[[[[[[[[[[@cnsh041415](/user/cnsh041415)](/user/cnsh041415)](/user/cnsh041415)](/user/cnsh041415)](/user/cnsh041415)](/user/cnsh041415)](/user/cnsh041415)](/user/cnsh041415)](/user/cnsh041415)](/user/cnsh041415)](/user/cnsh041415)](/user/cnsh041415)](/user/cnsh041415)](/user/cnsh041415) bin]$ node -bash: node: command not found

20 回复

./node ? 你试试?

= = 估计不是这么简单的问题。。总之我也没搞过- -。

[gimap@cnsh041415 bin]$ ./node ./node: /lib64/libc.so.6: version GLIBC_2.9' not found (required by ./node) ./node: /lib64/libc.so.6: versionGLIBC_2.6’ not found (required by ./node) ./node: /lib64/libc.so.6: version `GLIBC_2.7’ not found (required by ./node) [gimap@cnsh041415 bin]$ Linux Binaries (.tar.gz)

我先把python升级到2.7.3,然后再试试~~

@xuhaijinsky2008 擦 果然是 。。这个问题。看来你真是linux新手- -

注意看 readme… 应该还是要编译的


Evented I/O for V8 javascript. Build Status

To build:

Prerequisites (Unix only):

* Python 2.6 or 2.7
* GNU Make 3.81 or newer
* libexecinfo (FreeBSD and OpenBSD only)

Unix/Macintosh:

./configure
make
make install

Windows:

vcbuild.bat

To run the tests:

Unix/Macintosh:

make test

Windows:

vcbuild.bat test

To build the documentation:

make doc

To read the documentation:

man doc/node.1

Resources for Newcomers

@xiaojue 升级到2.7.3也不行,HOHO

@xuhaijinsky2008 呃, 你是对的 你下载的版本和我一样的么? http://nodejs.org/dist/v0.8.14/node-v0.8.14-linux-x86.tar.gz

➤➤ cd node-v0.8.14-linux-x86/
➤➤ ls
bin  ChangeLog  include  lib  LICENSE  README.md  share
➤➤ cd bin/
➤➤ ls 
node  node-waf  npm
➤➤ ./node -v
v0.8.14
➤➤ ./node
> console.log('fine')
fine
undefine

@jiyinyiyong 呵呵,我运气没那么好了,得出来个

[gimap@cnsh041415 bin]$ ./node -v ./node: /lib64/libc.so.6: version GLIBC_2.9' not found (required by ./node) ./node: /lib64/libc.so.6: versionGLIBC_2.6’ not found (required by ./node) ./node: /lib64/libc.so.6: version `GLIBC_2.7’ not found (required by ./node)

估计还是环境有问题。

我没有root权限,下载安装了python2.7.3后(原来是2.4.3),把当前用户的环境变量改成了python2.7.3在前面。

@jiyinyiyong 我拿源码过来make也报错。

Traceback (most recent call last): File "…/…/tools/js2c.py", line 36, in <module> import bz2 ImportError: No module named bz2 make[1]: *** [/wls/gimap/soft/node-v0.8.14/out/Release/obj/gen/libraries.cc] Error 1 make[1]: Leaving directory `/wls/gimap/soft/node-v0.8.14/out’ make: *** [node] Error 2 [gimap@cnsh041415 node-v0.8.14]$ ls

机器无法访问外网直接安装或升级真不爽。

@xuhaijinsky2008 不知道了… 要不帖一下具体服务器配置, 然后等等看有没有高人能看出是什么问题吧

export PATH=$PATH:/your/node/dir/bin export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/your/node/dir/lib

@jiyinyiyong 是python版本升级的问题,找基础架构部的同事搞定了。bz2和zlib有问题。貌似是因为64位安装时需增加参数。

@xuhaijinsky2008 原来如此, 下次记得在补充里说明是 64 位吧

@jiyinyiyong 嗯,应该把运行环境贴出来。

@jiyinyiyong 嗯,应该把运行环境贴出来。

我用的是Ubuntu源的更新。 省得自己每次下了。 https://launchpad.net/~chris-lea/+archive/node.js

回到顶部