In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to install linux node dependency, I hope you will learn something after reading this article, let's discuss it together!
Linux install node dependent methods: 1, download Node;2, download the software package in the / usr/local/src directory; 3, execute the "ln-s / usr/local/src/node-v8.10.0-linux-x64/bin/node" command.
This article operating environment: linux5.9.8 system, nodejs v8.10.0, Dell G3 computer.
Install node and npm on Linux
Note: recently, the react front-end framework needs to be used to separate the front and rear. Before installing react, I need to install node and npm first.
Since npm is dependent on node, as long as I install node, the npm installation is complete!
Download Node
Official website download link: https://nodejs.org/zh-cn/download/
I put the downloaded software package in the / usr/local/src directory.
Pressurized Node, since node downloads a package that has already been executed, there is no need to do any execution here.
Here we can see that there is a node,npm in the bin directory, which shows that it has actually been installed.
If you want to use npm and node globally, you need to do the relevant soft chain, as follows!
Go to the / usr/local/bin directory and execute the following command
[root@localhost bin] # ln-s / usr/local/src/node-v8.10.0-linux-x64/bin/npm [root@localhost bin] # ln-s / usr/local/src/node-v8.10.0-linux-x64/bin/node
The following status can be seen at this point
Then you can execute node-v npm-v anywhere to view the corresponding version, and the installation is complete!
Second, use Taobao image
Execute the following command
Npm config set registry https://registry.npm.taobao.org
Or check the Taobao mirror resource: https://npm.taobao.org/
Execute the following command:
Alias cnpm= "npm-registry= https://registry.npm.taobao.org\-cache=$HOME/.npm/.cache/cnpm\-disturl= https://npm.taobao.org/dist\-userconfig=$HOME/.cnpmrc"
You can use cnpm-v to view the version, and then operate the relevant process!
After reading this article, I believe you have some understanding of "how to install node dependency in linux". If you want to know more about it, please follow the industry information channel. Thank you for reading!
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: 0
*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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.