Friday, August 12, 2011

Installation of the latest (postgis enabled) PostgreSQL in (K)Ubuntu 11.04 x64

Download
Latest version of  PostgreSQL Graphical Installer (for the time being is postgresql-9.0.4-1-linux-x64.bin)

Installation
  • To install  PostgreSQL at /opt directory, call the Graphical Installer:
  • sudo chmod 0755  postgresql-9.0.4-1-linux-x64.bin
    sudo ./postgresql-9.0.4-1-linux-x64.bin
  • Optionally, install  postgis-1.5, using the Application Stack Builder before closing Graphical Installer. Otherwise, you may install it later, by calling the Application Stack Builder entry in your (kde/gnome) menu (after resolving the corresponding problems (see below)).

Configuration
Edit ~/.profile and append the line

source /opt/PostgreSQL/9.0/pg_env.sh
at the end, to update $PATH and set other env variables (you have to logout/login, for this change to take effect).

Problems
  • Execution of
  • /opt/PostgreSQL/9.0/stackbuilder/bin/stackbuilder
    executable failed, with a number of messages for missing libraries. The following links to (installed) libraries had to be set:
    sudo ln -sf  /usr/lib/x86_64-linux-gnu/libtiff.so.4.3.3 /usr/lib/x86_64-linux-gnu/libtiff.so.3
    sudo ln -sf /lib/x86_64-linux-gnu/libexpat.so.1.5.2 /lib/x86_64-linux-gnu/libexpat.so.0
    Depending on your current installation, other links to libraries (or the libraries themselves) may be missing as well. You have to locate those libraries (and if they miss, to install them) and make the corresponding links.
  • To be able to run stackbuilder from the (kde) menu entry, edit (as root) the file
  • /usr/share/applications/pg-stackbuilder-9_0.desktop
    and change the line
    Exec=/opt/PostgreSQL/9.0/scripts/launchstackbuilder.sh
    to
    Exec=kdesudo /opt/PostgreSQL/9.0/scripts/runstackbuilder.sh
  • To correct the (postgis related) problem of "$libdir/postgis-1.5.so not found", execute the command:
  • sudo ln -sf /opt/PostgreSQL/9.0/lib/postgis-1.5.so /opt/PostgreSQL/9.0/lib/postgresql/postgis-1.5.so

5 comments:

catalternative said...

Well came back my dear foo-bar :D

foo_gr said...

Thanx Cat-Alternative. Regards to pexlibanis.

mih said...

also was problem with installing postgis with steckbuilder, installation was succeed direct from temp folder /tmp/edb_postgis_1_5_pg91.bin

foo_gr said...

In fact, postgreSQL 9.1 has been fully intergrated as an official package since Ubuntu 11.10. Pachages for pgadmin3 and postgis are provided as well.

Anonymous said...

Appreciation to my father who informed me about this blog, this web site is
really remarkable.

Also visit my homepage Toms Sunglasses

Installation of MySQL(MariaDB) and phpMyAdmin on Ubuntu LTS focal (20.04)

Coming back again, "ten years after", trying to cope with this incredible mess that has resulted from the -admittedly- very good e...