Before you install , uninstall all the old version nvm, node.
Installation instructions
NOTE: If you are using RHEL 6 or CentOS 6, you might want to read about running Node.js on older distros.
Run as root on RHEL, CentOS, CloudLinux or Fedora:
NodeJS 12.x
curl -sL https://rpm.nodesource.com/setup_12.x | bash -
NodeJS 11.x
curl -sL https://rpm.nodesource.com/setup_11.x | bash -
NodeJS 10.x
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
NodeJS 8.x
curl -sL https://rpm.nodesource.com/setup_8.x | bash -
Optional: install build tools
To compile and install native addons from npm you may also need to install build tools:
yum install gcc-c++ make
# or: yum groupinstall 'Development Tools'
748 curl -sL https://rpm.nodesource.com/setup_10.x | bash -
749 sudo yum install -y nodejs
750 node --version
751 npm --version
[root@ip-172-31-35-223 node]# npm --version
6.9.0
[root@ip-172-31-35-223 node]# node --version
v10.16.3
[root@ip-172-31-35-223 node]#
No comments:
Post a Comment