Installing WiringPi for GPIO Control

If you do not have GIT installed, then under any of the Debian releases (ie. Raspbian), you can install it with:

sudo apt-get install git-core

If you get any errors here, make sure your Pi is up to date with the latest versions of Raspbian:

sudo apt-get update
sudo apt-get upgrade

To obtain WiringPi using GIT:

git clone git://git.drogon.net/wiringPi

If you have already used the cone operation for the first time, then

cd wiringPi
git pull origin

Will fetch an updated version then you can re-run the build script below.
To build/install there is a new simplified script:

./build

The new build script will compile and install it all for you – it does use the sude command at one point, so, you may wish to inspect the script before running it.