Install node.js on Galaxy Kylin v10

  1. download

    Download the version suitable for the operating system from the official website (URL: https://nodejs.org/en/download/ ). After testing, what needs to be downloaded here is ARMv8.

  2. unzip

    After the download is complete, find the location of the compressed package (you can also change the location by cutting), right-click to open the terminal, enter the lscommand to view the compressed package name, and then use the tarcommand to decompress.

  3. Rename

    The name after decompression is relatively long, you can use the mvcommand to rename the folder. Here rename the unzipped folder to nodejs. As shown below:

  4. link

    Establish a soft link to enable node and npm commands to be executed globally.

    First enter the subfolder bin under the nodejs folder, then use the pwdcommand to print the current path, and then use the ln -scommand to establish a soft link. Note that because it is a global establishment, it is necessary to use sudocommands to enter root privileges. The specific commands are shown in the figure below:

  5. verification

    Use node -vsum npm -vto check whether nodejs has become global.

 

Author: Yang Huihui

Guess you like

Origin blog.csdn.net/m0_46573967/article/details/112344529