Centos 7 Can't yum install npm
I just re-checked this. Both nodejs and npm and all dependencies for both have been added to epel 7. I just installed both on my CentOS 7 box. You should be able to do:
yum -y install nodejs npm
The -y flag will automatically answer "yes" to every confirmation question, so leave it out if you want to be able to say no to something.
On Centos 7, for installation of npm and nodejs, follow these steps
1. Open terminal
2. Run these commands (With sudo or root)
yum install epel-release
yum install npm nodejs
NPM isn't packaged for EPEL 7 yet. Give it some time, they are having to update thousands of packages already and had to wait for the CentOS release which was just a couple of days ago.
I suggest contacting the package maintainer (who appears to be patches) as they may not be aware that CentOS 7 is released and that they can now build their packages for it.
curl -L https://npmjs.org/install.sh | sh
I found this here: https://www.npmjs.org/doc/README.html#fancy-install-unix-
I tried it on a fresh CentOS 7 install and it works!
I have make a copr repository which provide the latest (sync with the Fedora rawhide) NodeJs and NPM. It also contains the build dependencies should you want to rebuild it.
Note that to build the latest NPM, you need openssl >=1.0.2, but EL7 only provide 1.0.1. So if you don't want to update the openssl to 1.0.2, please
append exclude=openssl*
to the end of /etc/yum.repos.d/dchen-nodejs-epel-7.repo