简体   繁体   中英

Install node js on centos

To install node js. I am referring this url https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-a-centos-7-server

but when I try extract source with this command tar xzvf node-v* && cd node-v*

I get error tar: node-v4.2.3-linux-x64/bin/npm: Cannot create symlink to ../lib/node_modules/npm/bin/npm-cli.js': Protocol error`

INSTALLING NODE.JS FROM EPEL REPOSITORY

An alternative method of installing node.js is from the Epel Repository that is available for CentOS and other linux distro's. To get access to the repo you must first install the epel-release by.

sudo yum install epel-release

Press y for yes and let it install.

After that you can just install node.js from yum.

sudo yum install nodejs

To verify the installed version you can do.

node --version

Refer : https://www.vpsserver.com/community/tutorials/20/install-node-js-on-centos-7/

尝试这个 !

sudo tar --strip-components 1 -xzvf node-v* -C /usr/local

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM