[postgis-users] Installing a fully functional PostGIS 2.0 on

THX1138 ap.joseph at live.com
Mon Feb 6 16:22:12 PST 2012


Nearly two months later I still have not yet figured out how to get
everything working. I have managed to install postgis 2.0 and get it working
but without topology and raster support which is most of the new
functionality.

GDAL simply will not cease to produce errors about being unable to locate
files (described at bottom of post)

The following describes my EXACT process fresh after system install and
application of updates on  Ubuntu 11.10 64bit.

--postgres install--
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install python-dev libreadline-dev
sudo apt-get install postgresql-9.1 postgresql-server-dev-9.1
postgresql-contrib-9.1 postgresql-plpython-9.1

--postgres setup--

sudo passwd postgres
sudo -u postgres psql postgres
#enter password twice on prompts

[in psql prompt]
\password postgres
#enter password twice on prompts
--pgadmin setup--

#You need to install a current version of pgadmin from launchpad in order to
for it to be of use!

sudo add-apt-repository ppa:rhonda/pgadmin3
sudo gedit /etc/apt/sources.list.d/rhonda-pgadmin3-oneiric.list

[in gedit replace "oneric" with "natty" on the following lines]

deb http://ppa.launchpad.net/rhonda/pgadmin3/ubuntu oneiric main
deb-src http://ppa.launchpad.net/rhonda/pgadmin3/ubuntu oneiric main

#update repository and install 

sudo apt-get update
sudo apt-get install pgadmin3=1.14.0~beta1-1~ppa1~natty1

#to install server instrumentation, just click "fix it" on the message that
pops up when you connect to server

#edit pg_hba.conf to add connections and disable password prompting.

sudo gedit /etc/postgresql/9.1/main/pg_hba.conf

[in gedit change the uncommented methods for connections to "trust" for
local,IPv4,IPv6; for any IPs you want to connect append the following to the
bottom of the file for each ip you want to connect:

host     all             all             [ip address here]/32        trust

#edit postgresql.conf

sudo gedit /etc/postgresql/9.1/main/postgresql.conf

#un-comment and change 'localhost' to '*' on the following line

#listen_addresses = 'localhost' ==> listen_addresses = '*'

--install proj--
sudo apt-get install libproj-dev proj-bin

--install geos--
sudo apt-get install swig php5-dev phpunit
cd /home/zoa3
mkdir gis
cd gis
mkdir geos
cd geos
wget http://download.osgeo.org/geos/geos-3.3.2.tar.bz2
tar xjvf geos-3.3.2.tar.bz2 
cd geos-3.3.2
./configure --enable-python --enable-php
make
sudo make install
sudo ldconfig

--prepare gdal--
cd /home/zoa3/gis
#download filegeodatabase api from
http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-download
#copy filegeodatabase api to gis folder
tar xzvf FileGDB_API_1_1-64.tar.gz
sudo apt-get install subversion
svn checkout https://svn.osgeo.org/gdal/trunk/gdal gdal
cd /home/zonability3/gis/gdal
svn update

sudo apt-get install openjpeg-tools libopenjpeg-dev
sudo apt-get install libpoppler13 libpoppler-dev (note different version
than in instructions)
sudo apt-get install expat libexpat1-dev libkml-dev libxerces-c-dev
sudo apt-get install libcurl4-openssl-dev

cd /home/zoa3/gis
mkdir mdb
cd mdb
#download and move jackcess-1.2.2.jar into mdb
(http://sourceforge.net/projects/jackcess/files/jackcess/1.2.2/jackcess-1.2.2.jar/download) 
wget
http://apache.deathculture.net//commons/lang/binaries/commons-lang3-3.1-bin.tar.gz
wget
http://apache.cs.utah.edu//commons/logging/binaries/commons-logging-1.1.1-bin.tar.gz
tar xzvf commons-lang3-3.1-bin.tar.gz 
tar xzvf commons-logging-1.1.1-bin.tar.gz 
sudo cp commons-logging-1.1.1/commons-logging-1.1.1.jar
commons-lang3-3.1/commons-lang3-3.1.jar jackcess-1.2.2.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/ext

--install gdal--

cd /home/zoa3/gis/gdal

./configure \
--with-python --with-poppler \
--with-pg \
--with-curl \
--with-openjpeg --with-geos --with-geotiff \
--with-jpeg --with-png \
--with-expat --with-libkml --with-xerces-c \
--with-java=/usr/lib/jvm/java-1.6.0-openjdk/ --with-mdb \
--with-fgdb=/home/zoa3/gis/FileGDB_API

make
sudo make install
sudo ldconfig

=======================================Errors============================================

---------------------Error1: 

Found when using open jdk 7 (installed with sudo apt-get install
openjdk-7-jdk)

./configure \
--with-python --with-poppler \
--with-pg \
--with-curl \
--with-openjpeg --with-geos --with-geotiff \
--with-jpeg --with-png \
--with-expat --with-libkml --with-xerces-c \
--with-java=/usr/lib/jvm/java-1.7.0-openjdk-amd64 --with-mdb \
--with-fgdb=/home/zonability3/gis/FileGDB_API

I receive the following messages:

zoa3 at ZB3:~$ gdalinfo --version
gdalinfo: error while loading shared libraries: libjvm.so: cannot open
shared object file: No such file or directory

When I try to locate that file I get the following results:

zoa3 at ZB3:~$ locate libjvm.so
/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/cacao/libjvm.so
/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jamvm/libjvm.so
/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/libjvm.so

--------------------------------Error2
Using jdk 6 which was apparently preinstalled as I found out when I used
locate in my previous try and fails on configure.

./configure \
--with-python --with-poppler \
--with-pg \
--with-curl \
--with-openjpeg --with-geos --with-geotiff \
--with-jpeg --with-png \
--with-expat --with-libkml --with-xerces-c \
--with-java=/usr/lib/jvm/java-1.6.0-openjdk/ --with-mdb \
--with-fgdb=/home/zoa3/gis/FileGDB_API

checking for location of Python Makefiles... found
checking where to install Python modules...
/usr/lib64/python2.7/site-packages
enabled
checking for python setuptools... not found
checking whether we should include Java support... configure: error: "Cannot
find /usr/lib/jvm/java-1.6.0-openjdk//include directory."

Error3:--------------
Trying to save myself the 11th reinstall of my entire system (as source gdal
1.9 has no uninstall functionality) I ran this without the java and mdb
line. 

it configured properly but then gave me the following when I tried to test
it:
zoa3 at ZB3:~/gis/gdal$ gdalinfo --version
gdalinfo: error while loading shared libraries: libFileGDBAPI.so: cannot
open shared object file: No such file or directory

Please let me know if you have any idea what might be wrong!


--
View this message in context: http://postgis.17.n6.nabble.com/Installing-a-fully-functional-PostGIS-2-0-on-Ubuntu-Linux-GEOS-GDAL-issues-tp3566227p4371098.html
Sent from the PostGIS - User mailing list archive at Nabble.com.



More information about the postgis-users mailing list