Compile and install Node. js in Ubuntu to download the latest compressed package from the node. js website, and decompress it to the/opt directory. Node. js details: Click Node here. js: Click here to install GCC and run it. /configureroot @ html5viewer1:/opt/node-v0.10.20 #. /configure {'target _ defaults': {'cflags ': [],
Compile and install Node. js in Ubuntu
Download the latest compressed package from the node. js website and decompress it to the/opt directory.
Node. js details: Click here
Node. js: Click here
After installing GCC, run./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/
Then start compilation. After installation, I run these commands under the root user.
Make
...
Make install
Finally, the node executable program is installed in the/usr/local/bin directory, and npm is installed in the/usr/local/lib/node_modules directory.
You can run make test for testing.
Recommended reading:
Node. Js getting started [PDF + related Code] http://www.linuxidc.com/Linux/2013-06/85462.htm
Node. js installation and configuration http://www.linuxidc.com/Linux/2013-05/84836.htm
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2