2

I've got an Ubuntu 12.04.2 server and I want to install Postgres 9.2.4. If I wanted to build all dependencies, I couldn't use apt-get build-dep (at least without some finagling) because only 9.1 is available to apt-get install. This leaves me in a "I wonder which new dependencies have been added since 9.1" sort of pickle. So, I decided to check Postgres 9.1's dependencies anyway, so i did a dry run:

me@my-server:~$ sudo apt-get build-dep postgresql-9.1 --dry-run
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  bison comerr-dev debhelper dh-apparmor docbook docbook-dsssl docbook-xsl flex gettext html2text intltool-debian krb5-multidev libbison-dev libcroco3 libedit-dev libexpat1-dev libfl-dev libgettextpo0
  libgssrpc4 libkadm5clnt-mit8 libkadm5srv-mit8 libkdb5-6 libkrb5-dev libldap2-dev libncurses5-dev libosp5 libossp-uuid-dev libossp-uuid16 libostyle1c2 libpam0g-dev libperl-dev libperl5.14 libpython3.2
  libssl-dev libunistring0 libxml2-dev libxslt1-dev libxslt1.1 m4 openjade opensp po-debconf python-dev python2.7-dev python3 python3-dev python3-minimal python3.2 python3.2-dev python3.2-minimal
  sgml-data tcl8.5 tcl8.5-dev xsltproc
0 upgraded, 54 newly installed, 0 to remove and 0 not upgraded.

... rest omitted

This tells me there are quite a few dependencies that aren't currently installed. Because of this, I decided to check out a dry run of the actual install of Postgres 9.1:

me@my-server:~$ sudo apt-get install postgresql-9.1 --dry-run
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libpq5 postgresql-client-9.1 postgresql-client-common postgresql-common ssl-cert
Suggested packages:
  oidentd ident-server locales-all postgresql-doc-9.1 openssl-blacklist
The following NEW packages will be installed:
  libpq5 postgresql-9.1 postgresql-client-9.1 postgresql-client-common postgresql-common ssl-cert
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.

... rest omitted

Now, my question is due to the fact that if I simply apt-get install libreadline6-dev libghc-zlib-dev (from a tutorial I read), I'm able to install Postgres 9.2.4 just fine. It seemed to run perfectly fine, and make check passed. So, is build-dep usually a good idea in cases like this, or does it typically install a lot more than one really needs?

orokusaki
  • 2,763
  • 4
  • 32
  • 43
  • For what it's worth, there's really no harm in just fetching the lot with `apt-get build-dep` unless you're concerned about disk space. – Craig Ringer Jun 02 '13 at 12:42
  • @CraigRinger - thanks, that's good to know, and I'm not overly concerned with disk space, so it's probably a good idea. – orokusaki Jun 02 '13 at 15:50

1 Answers1

3

According to PostgresSQL's install requirements, it just needs GNU make, GCC or similar, tar, GNU Readline, and zlib. Depending on your build options though, there are numerous other optional dependencies such as Perl and Python.

If you don't need any of the optional features, you can certainly leave them off; you just won't be able to choose them at build time. build-dep is trying to solve all dependencies for the way that the Ubuntu package maintainer built the package, which likely includes many of the build options so that the broadest number of people can use it.

j883376
  • 266
  • 3
  • 8