Tried sudo apt-get install postgresql-9.4 but it doesn't find it.

How can I install this version?

  • Does it really have to be 9.4 or would 9.5 suffice ?
    – Videonauth
    Commented Apr 30, 2016 at 18:20
  • I need it to reflect the AWS version which is 9.4. :( At least I need the client of 9.4 to talk to it.
    – Houman
    Commented Apr 30, 2016 at 18:22

1 Answer 1


Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repository:

deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main

Import the repository signing key, and update the package lists:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update 

Then do:

sudo apt-get install postgresql-client-9.4 postgresql-9.4 postgresql-contrib-9.4 libpq-dev postgresql-server-dev-9.4

# pgAdmin III graphical administration utility
sudo apt-get install pgadmin3
  • For Ubuntu 18.04 just replace xenial with bionic.
    – VietTD
    Commented Oct 5, 2018 at 6:35

You must log in to answer this question.

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