0

I am trying to install Postgres on my Ubuntu 13.04 system. In order to do so, I ran the following commands...

$ sudo apt-get update
$ sudo apt-get install postgresql-common -t raring

Both of which went fine. Then I tried to install the client by running...

$ sudo apt-get install postgresql-9.2

Which resulted in the following error message...

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package postgresql-9.2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'postgresql-9.2' has no installation candidate

The notion that 9.2 would be "obsoleted" seems very strange to me, as when I go to the Postgres site and check out the Ubuntu installation page, I am told to run the command...

apt-get install postgresql-9.2 
2
  • There is no postgresql-9.2 package for Ubuntu 13.04. Please search packages.ubuntu.com. Commented Oct 27, 2013 at 19:58
  • 2
    This question belongs to askubuntu.com Commented Oct 27, 2013 at 20:00

1 Answer 1

3

Try based on the following thread

https://serverfault.com/questions/514329/installing-postgres-on-ubuntu-package-not-available

In Ubuntu official repositories only PostgreSQL 9.1 is available. That is why it couldn't >be found.

In order to get PostgreSQL v9.2 in your VPS using apt you should follow the official >PostgreSQL procedure for Ubuntu found here

It consists of adding PostgreSQL official repository as one of your repository source

Create the file /etc/apt/sources.list.d/pgdg.list

Insert this line deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main

Import the repository signing key wget --quiet -O - https://www.postgresql.org/media /keys/ACCC4CF8.asc | sudo apt-key add -

Refresh your repositories cache sudo apt-get update

Now you can simply do sudo apt-get install postgresql-9.2

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.