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
git
andperl-Digest-SHA
if you don’t have them already:sudo yum install git perl-Digest-SHA -y
If you are missingperl-Digest-SHA
you’ll get achecksums don't match
error when you attempt to install. - Clone the
nvm
repository:git clone git://github.com/creationix/nvm.git ~/nvm
- Once you’ve cloned it, execute the following to add a line to your
~/.bashrc
environment file (this assumes that you checked outnvm
in 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