6

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?

7

try this:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ 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

2

Try

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.

2
  • Thanks for the response, unfortunately still has the same issue. – Toby Hede May 31 '13 at 9:06
  • i was able to get my desired version of libpq-dev installed by first downgrading libpq5 via sudo apt-get install -t precise-pgdg 'libpq5=9.3.15-1.pgdg12.4+1' and then installing libpq-dev via sudo apt-get install -t precise-pgdg 'libpq-dev=9.3.15-1.pgdg12.4+1'. thanks, peter! – wrksprfct Dec 1 '16 at 21:54
1

You can temporary install the one from http://pkgs.org/download/libpq5.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.