Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am attempting to install PG 9.3 on Ubuntu 12.04

---- Begin output of apt-get -q -y install postgresql-client-9.3=9.3~beta1-1.pgdg12.4+2 ----
STDOUT: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql-client-9.3 : Depends: libpq5 (>= 9.3~beta1) but 9.2.4-1.pgdg12.4+1 is to be installedSTDERR: E: Unable to correct problems, you have held broken packages.
---- End output of apt-get -q -y install postgresql-client-9.3=9.3~beta1-1.pgdg12.4+2 ----

I have install libpq5 but obviously have got the incorrect version.

How do I install the correct version?

share|improve this question

try this:

wget --quiet -O - | sudo apt-key add -
sudo sh -c 'echo "deb precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
sudo apt-get update
sudo apt-get install postgresql-9.3 pgadmin3

It worked fine for me.

Source: How to: Install PostgreSQL 9.3 on Ubuntu – Complete Guide

share|improve this answer


apt-get install -t precise-pgdg postgresql-client-9.3

You need to "allow" it to get all the necessary dependencies from this nonstandard repository as well.

share|improve this answer
Thanks for the response, unfortunately still has the same issue. – Toby Hede May 31 '13 at 9:06

You can temporary install the one from

You also need libpq-dev if you want to install postgresql-server-9.3.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .