Hello Linux and Unix Geeksters.
In this article I will show you how to install PostgreSQL 9.2 on Ubuntu 13.04 Raring Ringtail.
Because there are no PostgreSQL packages for Ubuntu 13.04 Raring Ringtail yet, we will use the files for Ubuntu 12.04 Precise Pangolin.
Follow this steps for a successful installation:
Step 1. Install some dependencies:
$ sudo apt-get install libpq-dev libpq5
Step 2. Add the repo:
$ sudo su
# echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' >> /etc/apt/sources.list.d/pgdg.list
Step 3. Add the key:
# wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add -
Step 4. Upgrade (thank you for the help Laurent):
$ sudo apt-get update
Step 5. Install PostgreSQL:
$ sudo apt-get -t raring install postgresql-common -t raring postgresql-9.2 postgresql-client-9.2
This isn’t quite working for us. At Step 5 after executing the command we receive the following:
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-9.2 : Depends: postgresql-client-9.2 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Any ideas would be very helpful how to proceed here.
Many Thanks.
I had to do following:
sudo apt-get update
sudo apt-get install postgresql-common -t raring
sudo apt-get install postgresql-9.2
It worked for me 🙂
try:
sudo apt-get install postgresql-common -t raring postgresql-client-9.2
After step 4: sudo apt-get update should type
# sudo apt-get upgrade
This will correct and remove the error
E: Unable to correct problems, you have held broken packages.
then step 5
@ Laurent, you just saved me hours of reinstalling & reconfiguring. I was just about to uninstall Ubuntu 13.04 and go back to 12.04. I would’ve had no choice but to do that, ’cause I need to have a working PostgreSQL. Thank you!! And thank you Geekster for writing this post… altho you should update it to reflect the “upgrade” instead of “update”.