![]() Let’s check if the new yum repository has been added correctly: $ ls -la /etc//|grep nodesource -rw-r-r. # You may also need development tools to build native addons: sudo yum install gcc-c++ make # To install the Yarn package manager, run: curl -sL | sudo tee /etc//yarn.repo sudo yum install yarn # Run `sudo yum install -y nodejs` to install Node.js 12.x and npm. Run `sudo yum remove -y nodejs npm` to remove these first. ![]() + rpm -qa 'node|npm' | grep -v nodesource # Your system appears to already have Node.js installed from an alternative source. + rm -f '/tmp/tmp.kNjfOcFMcS' # Checking for existing installations. + rpm -i -nosignature -force '/tmp/tmp.kNjfOcFMcS' # Cleaning up. + mktemp + curl -sL -o '/tmp/tmp.kNjfOcFMcS' '' # Installing release setup RPM. + curl -sLf -o /dev/null '' # Downloading release setup RPM. + rpm -q -whatprovides redhat-release || rpm -q -whatprovides centos-release || rpm -q -whatprovides cloudlinux-release || rpm -q -whatprovides sl-release + uname -m # Confirming "el7-x86_64" is supported. This is the output from the script: # Installing the NodeSource Node.js 12.x repo. This command will first use the curl tool to download the “setup_12.x” script and then execute this script using bash. This can be done by using the following command as user root: curl -sL | bash. The upgrade steps for CentOS are explained here: įirst, you need to add the NodeSource yum repository to your system. I can see from that the last Active LTS version is v12, so I would like to upgrade to that version. Let’s check the current version and location of Node.js and npm (the Node.js package manager): $ node -version v6.17.1 $ npm -version 3.10.10 $ which node /bin/node $ which npm /bin/npm ![]() On my machine, I had previously installed Node.js using the following command: $ sudo yum install nodejs ![]() In this blog post I will explain how you can upgrade Node.js to the most recent version using the “yum” package manager utility on CentOS Linux 7. How to upgrade Node.js from v6 to latest on CentOS Linux 7 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |