linux node.js 编译,Ubuntu 编译安装Node.js

Ubuntu 编译安装Node.js

到node.js网站下载最新压缩包,然后解压到/opt目录下。

Node.js 的详细介绍:请点这里

Node.js 的下载地址:请点这里

安装GCC后,运行./configure

root@html5viewer1:/opt/node-v0.10.20# ./configure

{ 'target_defaults': { 'cflags': [],

'default_configuration': 'Release',

'defines': [],

'include_dirs': [],

'libraries': []},

'variables': { 'clang': 0,

'gcc_version': 48,

'host_arch': 'x64',

'node_install_npm': 'true',

'node_prefix': '',

'node_shared_cares': 'false',

'node_shared_http_parser': 'false',

'node_shared_libuv': 'false',

'node_shared_openssl': 'false',

'node_shared_v8': 'false',

'node_shared_zlib': 'false',

'node_tag': '',

'node_unsafe_optimizations': 0,

'node_use_dtrace': 'false',

'node_use_etw': 'false',

'node_use_openssl': 'true',

'node_use_perfctr': 'false',

'node_use_systemtap': 'false',

'Python': '/usr/bin/python',

'target_arch': 'x64',

'v8_enable_gdbjit': 0,

'v8_no_strict_aliasing': 1,

'v8_use_snapshot': 'true'}}

creating  ./config.gypi

creating  ./config.mk

root@html5viewer1:/opt/

然后开始编译,成功后安装,我都是在root用户下运行这些命令。

make

...

make install

最后node可执行程序安装在/usr/local/bin目录下,npm安装在/usr/local/lib/node_modules目录下

可以运行make test进行测试。

推荐阅读:

0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值