Follow these steps to install Graphite on a fresh Ubuntu 13.04 Server instance. Make sure you read and understand the commands because by the time you read this, things could be outdated.
Run all commands below (including pip invocations) as root or prepend sudo to each.
# apt-get install libpq-dev