Installing Bower on Ubuntu

Solution 1:

sudo ln -s /usr/bin/nodejs /usr/bin/node

or install legacy nodejs:

sudo apt-get install nodejs-legacy

As seen in this GitHub issue.

Solution 2:

sudo apt-get install nodejs

installs nodejs

sudo apt-get install npm

installs npm

sudo npm install bower -g

installs bower via npm

Solution 3:

At Least from Ubuntu 12.04, an old version (0.6.x) of Node is in the standard repository. To install, just run:

sudo apt-get install nodejs

NPM comes with latest version of nodejs. Once you have that, then run

sudo npm install bower -g

Should be good to go after that. You may need to run some updates, but it should be fairly straight forward.

Solution 4:

First of all install nodejs:

sudo apt-get install nodejs

Then install npm:

sudo apt-get install npm

Then install bower:

npm install -g bower

For any of the npm package tutorial visit: https://www.npmjs.com/

Here just search the package and you can find how to install, documentation and tutorials as well.

P.S. This is just a very common solution. If your problem still exists you can try the advanced one.