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 Apr 30 '16 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 Apr 30 '16 at 18:22
up vote 15 down vote accepted

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 Oct 5 at 6:35

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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