Skip to content

Instantly share code, notes, and snippets.

@pyk
Created January 3, 2014 18:05
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save pyk/8243010 to your computer and use it in GitHub Desktop.
Save pyk/8243010 to your computer and use it in GitHub Desktop.
installing postgresql 9.3.2 on ubuntu 12.04 . with error fix: ummet dependencies

installing postgresql 9.3.2 on ubuntu 12.04

$ echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install postgresql-9.3 postgresql-contrib-9.3

you should succesfully installing postgresql 9.3.2 on your machine.

but, if you have same problem like me.

The following packages have ummet dependencies:
  postgresql-9.3 :  Depends: postgresql-client-9.3 but is not going to be installed
                    Depends: postgresql-common (>=1.4.2)...
  ...

you should install postgresql-common with specific version like this:

$ sudo apt-get install postgresql-common=151.pgdg12.4+1
$ sudo apt-get install postgresql-9.3 postgresql-contrib-9.3
@arnelbucio
Copy link

to find out what the latest specific version is, run:
sudo apt-cache policy postgresql-common

@goldan
Copy link

goldan commented Mar 3, 2014

Thank you, it works!

@miguelcobain
Copy link

Had to do the same procedure for the package postgresql-client-common. Then did it for postgresql-common and postgres installed fine after that.
Thank you!

@phsacramento
Copy link

+1 Thank you

@mcbsys
Copy link

mcbsys commented Apr 9, 2014

Thanks for this. My notes:

I got stuck on the first step (access denied) until I found http://askubuntu.com/questions/185268/permission-denied-etc-apt-sources-list. This worked:

sudo su -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"

Not sure if I need postgressql-contrib-9.3. After updating the repository, I went with the command from the official guide (I do need pgadmin):

sudo apt-get install postgresql-9.3 pgadmin3

That command told me that the "extra packages" postgresql-client-common and postgres-common will be installed (among others).
.
This successfully installed the current PostgreSQL, version 9.3.4.

@olukha
Copy link

olukha commented Jun 26, 2014

Thank you

@ericsaboia
Copy link

Thanks!

@Rustem
Copy link

Rustem commented Aug 12, 2014

sudo apt-get install -f

@satyapramodh
Copy link

+1 thanks

@yashodharIITHyd
Copy link

Thank u bro..:)

@dgamanenko
Copy link

Thanks!

@maestro5
Copy link

Thank you!

@ranjan653
Copy link

ranjan653 commented Mar 27, 2017

service postgresql start: it is showing ok in ubuntu 12.04 server edition
service postgresql stop : it showing error as Stopping postgresql: pg_ctl: PID file "/home/pgsql/postmaster.pid" does not exist
Is server running?

I am unable to connect to database. Please help me out

@ranjan653
Copy link

ranjan653 commented Mar 27, 2017

Also If I do the backup through pg_dumpall -U postgres -c > 27-03-17.sql
pg_dumpall: coluldnot connect to database "template1": couldnot connect to server : No such file or directyory
Is server running locally and accepting
connection on unix domain socket "/tmp/.s.PGSL.5432"?...............How to solve this please help me out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment