Ubuntu 编译安装node.js
2013-10-09 16:51
423 查看
到node.js网站下载最新压缩包,然后解压到/opt目录下。
安装GCC后,运行./configure --prefix=/usr, 我试过在Ubuntu 13.10上用clang 3.4,编译也是可以的。
root@html5viewer1:/opt/node-v0.10.20# ./configure --prefix=/usr
{ '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进行测试。
安装GCC后,运行./configure --prefix=/usr, 我试过在Ubuntu 13.10上用clang 3.4,编译也是可以的。
root@html5viewer1:/opt/node-v0.10.20# ./configure --prefix=/usr
{ '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进行测试。
相关文章推荐
- 【图文】Ubuntu系统源码方式编译安装node.js以及express安装出现找不到命令的问题
- Ubuntu 上安装 Node.js(按照源代码编译的方式去安装)
- Ubuntu编译安装Node.js
- Cubieboard CC-A80性能之Ubuntu Linaro编译安装Node.js
- [备忘]ubuntu安装node.js
- ubuntu 13.04安装node.js过程问题集锦
- [Node.JS-1]*NIX下源码编译安装
- ubuntu14.10下nodejs + npm + bower的安装
- 如何在Ubuntu上安装最新版本的Node.js
- Ubuntu安装node.js
- Redis加Node.js的全文搜索引擎 Reds在Ubuntu下面 的安装
- Node.js:ubuntu安装Node.js
- ubuntu 安装node.js + express + mongodb
- UbuntuServer安装Node.js
- ubuntu14.04安装nodejs less
- 在Ubuntu 上安装node.js
- CentOS编译安装NodeJS+Express
- Ubuntu 15.04下安装Node.JS的不同方式
- Ubuntu上如何安装Node.js
- ubuntu下安装 nvm ,node.js