Install postgresql 9.3 on ubuntu 12.04

6

5

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?

Toby Hede

Posted 2013-05-30T09:42:40.300

Reputation: 161

Answers

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

Vipin raj

Posted 2013-05-30T09:42:40.300

Reputation: 71

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.

Peter Eisentraut

Posted 2013-05-30T09:42:40.300

Reputation: 6 330

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 – 2016-12-01T21:54:42.600

Thanks for the response, unfortunately still has the same issue. – Toby Hede – 2013-05-31T09:06:53.213

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.

Seuros

Posted 2013-05-30T09:42:40.300

Reputation: 11