I am using Ubuntu 12.10.
I had the same issue.
I am going to describe my exact fixes for
npm install -g yo
- Yeoman requires node version >= 0.8
- Because of permissions, I needed to use
sudo npm install -g yo
The steps are:
sudo apt-get install python-software-properties -y
sudo apt-get install software-properties-common -y
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update -y
sudo apt-get install nodejs -y
sudo npm install -g yo
install nodejs
is to update the node to the latest version
add-apt-repository
is needed for a better repository to update the nodejs
python-software-properties
and software-properties-common
are for add-apt-repository
For references:
See https://stackoverflow.com/a/16032073/80353 which explains why you need to install either the python or the software to run add-apt-repository
See https://stackoverflow.com/a/16303380/80353 which inspires the general steps