The easiest way to install Node.js on Fedora these days (as far as I can tell) is using creationix’s NVM (Node Version Manager) script.
You can grab it by cloning it from his github site.
- Install
gitandperl-Digest-SHAif you don’t have them already:sudo yum install git perl-Digest-SHA -y
If you are missingperl-Digest-SHAyou’ll get achecksums don't matcherror when you attempt to install. - Clone the
nvmrepository:git clone git://github.com/creationix/nvm.git ~/nvm
- Once you’ve cloned it, execute the following to add a line to your
~/.bashrcenvironment file (this assumes that you checked outnvmin your home directory, so as~/nvm):echo "source ~/nvm/nvm.sh" >> ~/.bashrc
- Now to load that environment, run:
source ~/.bashrc
Now you have
nvm installed, and can use it to install and manage node versions.
To install the latest (at the time of writing) node.js version:
nvm install 0.8.18
And to set it as the default:
nvm alias default 0.8.18
Enjoy.
Thanks to both you and the guy who created nvm!
ReplyDelete