0

I'm trying to upgrade a server from postgresql-9.1 to version 9.6. I would normally install something with apt-get install but I'm working with a server at work that doesn't have direct internet access. I'm also trying to avoid an apt-get update (that seems to be part the instructions for installing with apt-get) because, when I previously ran this it caused problems with the samba shares on the server.

For these reason I have attempted to install postgressql-9.6 from source. The installation appeared to go smoothly (./configure, make and make install ran smoothly) and I received a message suggesting postgres-9.6 had been successful installed. However, when I run:

sudo aptitude search postgresql | grep ^i 

All I can see is the postgresql-9.1 version. There is also nothing that suggests version 9.6 has been installed in /etc/postgresql/ or /usr/lib/postgresql/. How is it possible that I'm getting installation success messages, but not a sniff of the actual program on the server?

David Foerster
  • 36,264
  • 56
  • 94
  • 147
neilH
  • 103
  • Since you didn't install it using package manager it doesn't 'know' it's installed. Check if /usr/local/pgsql/bin/postgres exists. – michal Jun 27 '17 at 19:52
  • Superficially this question isn't version-specific imho, and it has received a good answer, but since 12.04 is no longer supported, questions about it are off-topic. You can expect any package management attempts to go awry as the repositories will be unmaintained. Therefore, please upgrade to a supported release and ask a new question if you need further help with this. Doing so should solve the underlying issues anyway :) – Zanna Jun 28 '17 at 13:39

1 Answers1

3

By default a postgresql service built from the stock sources (from https://www.postgresql.org/ftp/source) will be installed into /usr/local/pgsql, and your Ubuntu system will totally ignore it, it's not part of what it knows about.

Part of the reasons why packages are used is not just to avoid compilation, it's to have proper integration into the system concerning starting/stopping/logging the service, and consistency in where all the programs and files reside.

If you manage yourself all these aspects, it's entirely possible to use postgresql from /usr/local/pgsql

If you were using a recent version of Ubuntu, an easier option would be to grab the pre-compiled packages in the form of .deb files and install then manually with dpkg, if you have to pick them up individually rather than having apt-get update do it for you. The precompiled binaries made available by PGDG are https://apt.postgresql.org/pub/repos/apt/pool/9.6/p/postgresql-9.6/

However as you have Ubuntu 12.04, your next problem is that it's no longer supported, so I don't think these packages would work, in the sense that they would probably depend on other packages that 12.04 doesn't have.

Daniel Vérité
  • 1,213
  • 8
  • 10
  • Ok, this sounds like a bit of a minefield then! Is there any way with apt-get update to only update things related to postgresql and ignore everything else so that there is minimal damage? – neilH Jun 28 '17 at 10:39
  • @bms9nmh: apt-get update does not update packages, only their list. Check out https://askubuntu.com/questions/222348/what-does-sudo-apt-get-update-do – Daniel Vérité Jun 28 '17 at 12:22