[postgis-users] Updated PostGIS 2.0 Ubuntu 12.04 install instructions posted

siah siah at berkeley.edu
Tue Oct 2 16:48:56 PDT 2012


I had similar issues, but with a few extra lines in config.log:
configure:19660: gcc -o conftest  -I/usr/include/gdal  conftest.c -lgdal 
-L/usr/lib -lgdal >&5
/usr/bin/ld: warning: libjvm.so, needed by /usr/lib/libgdal.so, not found
(try using -rpath or -rpath-link)
/usr/lib/libgdal.so: undefined reference to
`JNI_CreateJavaVM at SUNWprivate_1.1'
/usr/lib/libgdal.so: undefined reference to `pj_ctx_free'
/usr/lib/libgdal.so: undefined reference to
`JNI_GetCreatedJavaVMs at SUNWprivate_1.1'
/usr/lib/libgdal.so: undefined reference to `pj_ctx_alloc'
/usr/lib/libgdal.so: undefined reference to `pj_ctx_get_errno'
/usr/lib/libgdal.so: undefined reference to `pj_init_plus_ctx'
collect2: ld returned 1 exit status
...

I tried installing Java like so `sudo aptitude install openjdk-7-jre`, and
the libjvm.so error went away, but all of the undefined references stayed.
Installing Oracle's version of java worked for removing the
JNI_CreateJavaVM at SUNWprivate_1.1 and JNI_GetCreatedJavaVMs at SUNWprivate_1.1
errors. Following instructions at
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Then adding the library path..
find /usr -name libjvm.so
	/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server/libjvm.so
sudo nano /etc/ld.so.conf.d/jvm.conf # enter the line
"/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server"
sudo ldconfig

Config still failed with 
configure:19660: gcc -o conftest  -I/usr/include/gdal  conftest.c -lgdal 
-L/usr/lib -lgdal >&5
/usr/lib/libgdal.so: undefined reference to `pj_ctx_free'
/usr/lib/libgdal.so: undefined reference to `pj_ctx_alloc'
/usr/lib/libgdal.so: undefined reference to `pj_ctx_get_errno'
/usr/lib/libgdal.so: undefined reference to `pj_init_plus_ctx'
collect2: ld returned 1 exit status

Turns out those were from outdated libproj packages. The final fix was `sudo
aptitude upgrade`
The following packages will be upgraded: 
  libproj-dev libproj0 proj-bin proj-data 
...

After that, the install finished without a hitch. Step 3 of 4 was
unnecessary for me as well. 



--
View this message in context: http://postgis.17.n6.nabble.com/Updated-PostGIS-2-0-Ubuntu-12-04-install-instructions-posted-tp4955872p5000179.html
Sent from the PostGIS - User mailing list archive at Nabble.com.



More information about the postgis-users mailing list