Installing PostgreSQL from source on Ubuntu 10.10 (Maverick Meerkat)

by gorthx

About a month ago, I rebuilt my laptop with Ubuntu 10.10. This week, while I was waiting around to be selected for jury duty, I decided I should be constructive with my time instead of just getting annoyed with the really loud people sitting next to me. So I slurped up some of that delicious courthouse wireless & downloaded & installed Postgres 9.0.1. (You can get 8.4.5 as a package for Ubuntu, but I like using a more recent version.)

During my install, I remembered I’d had some problems the first time I installed Pg from source on Ubuntu, and had never written about it. I had the same problems this time, but they are all easily solvable by installing some extra packages.

Here’s my configuration command:

When I tried this, I got:
configure: error: readline library not found
…even though I already had readline installed. The solution was to install libreadline6-dev*. The -dev libraries include the header files needed to compile Pg.

For reference (and search engine) purposes, here are the other errors I got:
configure: error: library ‘crypto’ is required for OpenSSL
…fixed by installing libssl-dev.
configure: error: library ‘xml2’ (version >= 2.6.23) is required for XML support
…fixed by installing libxml2-dev.
/usr/bin/ld: cannot find -lperl #got this one during make
…fixed by installing libperl-dev.

‘make clean’, ‘make’, and ‘sudo make install’, and then I continued with the normal installation steps. Ta-da.

*libreadline5-dev may work; I didn’t try that.

eta I’ve since been informed of this repo: (I’ll continue to install from source, myself, because I like having control over all the little details.)


2 Trackbacks to “Installing PostgreSQL from source on Ubuntu 10.10 (Maverick Meerkat)”

%d bloggers like this: