Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Install Bower on Ubuntu

DZone's Guide to

How to Install Bower on Ubuntu

We all like to organize and simplify our front-end libraries. Bower is a package manager that's worth a look.

· Web Dev Zone
Free Resource

Make the transition to Node.js if you are a Java, PHP, Rails or .NET developer with these resources to help jumpstart your Node.js knowledge plus pick up some development tips.  Brought to you in partnership with IBM.

bower

In this tutorial, we're going to be installing Bower onto Ubuntu. Bower is a package manager for front-end libraries, similar to that of Composer. It runs on Node.js and uses Git to install the required packages.

As it requires Git to install the packages we first need to make sure git is installed.

$ sudo apt-get install git-core

Bower uses Node.js and npm to manage the programs so let's install these.

$ sudo apt-get install nodejs

Node will now be installed with the executable located in /etc/usr/nodejs.

You should be able to execute Node.js by using the command below, but as ours are located in nodejs we will get the error: No such file or directory.

$ /usr/bin/env node

We can manually fix this by creating a symlink.

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

Now, check Node.js is installed correctly by using.

$ /usr/bin/env node
>

Install npm

$ sudo apt-get install npm

Install Bower

sudo npm install -g bower

Check Bower is installed and what version you're running.

$ bower -v
1.7.9

Learn why developers are gravitating towards Node and its ability to retain and leverage the skills of JavaScript developers and the ability to deliver projects faster than other languages can.  Brought to you in partnership with IBM.

Topics:
ubuntu ,bower ,package-manager

Published at DZone with permission of Paul Underwood, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}