In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to install nodejs in liunx". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install nodejs in liunx.
Liunx install nodejs method: 1, select the corresponding linux version to download and establish a soft link to set it to the global; 2, through the source code compilation and installation; 3, through the Ubuntu under the apt-get installation.
This article operating environment: linux6.x system, nodejs v5.10.1 version, Dell G3 computer.
How does liunx install nodejs?
Installation of Nodejs under Linux (complete details)
I have installed node under windows and Mac before, and I feel very convenient. I can't believe that I have been cheated for a long time to install linux today. I hereby record.
First of all, go to the official website to download the code, here we must pay attention to the installation of two kinds, one is the Source Code source code, the other is the compiled file. I just operate the compiled files in accordance with the installation of the online source code, resulting in a pit for a long time.
(1) compiled documents
Like the red box in the image above is the compiled file, select the corresponding linux version to download, to put it simply, node and npm already exist in the bin folder after decompression. If you enter the corresponding file to execute the command line, there is no problem at all, but it is not global, so set this to global by establishing a soft link.
Tar xf node-v5.10.1-linux-x64.tar.gz-C / usr/local/cd / usr/local/mv node-v5.10.1-linux-x64/ nodejsln-s / usr/local/nodejs/bin/node / usr/local/binln-s / usr/local/nodejs/bin/npm / usr/local/bin
(2) compiling through source code
This way you download the file is Source code, because my linux version is 6.x, the default gcc-c++ is 4.4.7 version, and down after the source code compilation requires a minimum gcc-c++ version of 4.8, so I went to upgrade the GCC-C++ version, as a result, because the source code compilation upgrade GCC-C++, compiled for more than an hour, did not complete the compilation! Be fooled decisively.
Root > #. / configure WARNING: C++ compiler too old, need gathers + 4.8 or clang++ 3.4 (CXX=g++) creating. / icu_config.gypi {'target_defaults': {' cflags': [], 'default_configuration':' Release', 'defines': [],' include_dirs': [] 'libraries': []},' variables': {'asan': 0,' gas_version': '2.20 percent,' host_arch': 'x64 percent,' icu_small': 'false',' node_byteorder': 'little' 'node_install_npm': 'true',' node_prefix':'/ usr/local', 'node_release_urlbase':', 'node_shared_http_parser':' false', 'node_shared_libuv':' false' 'node_shared_openssl': 'false',' node_shared_zlib': 'false',' node_tag':', 'node_use_dtrace':' false', 'node_use_etw':' false', 'node_use_lttng':' false' 'node_use_openssl': 'true',' node_use_perfctr': 'false',' openssl_fips':', 'openssl_no_asm': 0,' target_arch': 'x64', 'uv_parent_path':' / deps/uv/' 'uv_use_dtrace':' false','v8 disabled enabling gdbjitters: 0,'v8 disabled enabling i18 nailed supportholders: 0,'v8 disabled noisy stricting alienating: 1,'v8 disabled disabled debugging: 0,'v8 disabled disabled debugging: 0 Creating. / config.gypicreating. / config.mkWARNING: warnings were emitted in the configure phase: 'true',' want_separate_host_toolset': 0}} creating. / config.gypicreating.
(3) apt-get
Another is the apt-get method under Ubantu, which I was fooled by before.
Sudo apt-get install nodejs
Sudo apt-get install npm
After this installation, you will find that the node command does not work, but the nodejs command can be used.
At this point, I believe you have a deeper understanding of "liunx how to install nodejs". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 212
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.