I tried to install Postgresql from the basic apt dir with the commands listed on the ubuntu wiki which are sudo apt-get install postgresql postgresql-contrib

This returns an error, the only way that works for me if by installing it this way: https://tecadmin.net/install-postgresql-server-on-ubuntu/

Can someone tip me about what is the correct way to install from the apt directory? Thank you!

  • If you find ubuntu wiki pages in need of update, please link to them so we can amend them if we're able. Most of the Ubuntu wiki is community maintained, so it's up to us to amend & update them as necessary – guiverc Jun 4 '19 at 22:09

Your 1st 3 stops should be Ubuntu packages, Launchpad and the official website.

Version 11 is only available in 19.04 and the package name and installation command is:

sudo apt install postgresql-11


$ sudo apt install postgresql-11
[sudo] password for rinzwind: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libllvm7 libpq5 postgresql-client-11 postgresql-client-common
  postgresql-common sysstat
Suggested packages:
  postgresql-doc-11 libjson-perl isag
The following NEW packages will be installed:
  libllvm7 libpq5 postgresql-11 postgresql-client-11 postgresql-client-common
  postgresql-common sysstat
0 upgraded, 7 newly installed, 0 to remove and 31 not upgraded.
Need to get 27,4 MB of archives.
After this operation, 104 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

if you want it in 18.04 you can also download it from the 4th link above but you will need to check all the dependencies.

|improve this answer|||||
  • Is there an obvious way to find this kind of information other than by asking around? When I try to apt-cache search postgresql i get so many packages and yet postgresql-11 is not one of them – Logarithm Jun 5 '19 at 21:36
  • And you are using 19.04? – Rinzwind Jun 6 '19 at 7:03
  • Yes 19.04 thank you – Logarithm Jun 7 '19 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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