I am trying to install PostGIS on Linux Mint 14 KDE. First thing I tried was to install PostgreSQL using "sudo apt-get install postgresql". I was successful doing that. I then did "sudo apt-get install postgis" and it installed something, but when I try to use it, say following the tutorials on the postGIS site, it won't recognize any command I type and the tutorial will refer me back to the installation section.

So, I assume the Linux Mint PostGIS package is somehow broken or I am missing some key step. So, I decided to install PostGIS by building from source. After downloading many different dependencies I still can't get it to compile. I can successfully do ./configure. But it fails on 'sudo make' with the following error:

make -C liblwgeom 
make[1]: Entering directory `/home/user/Downloads/postgis-1.4.2/liblwgeom'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/user/Downloads/postgis-1.4.2/liblwgeom'
make -C postgis 
make[1]: Entering directory `/home/user/Downloads/postgis-1.4.2/postgis' gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -pie -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -I/usr/include  -I../liblwgeom -I. -I. -I/usr/include/postgresql/9.1/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -DLINUX_OOM_ADJ=0 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.5  -c -o lwgeom_accum.o lwgeom_accum.c
lwgeom_accum.c: In function ‘pgis_geometry_accum_transfn’:
lwgeom_accum.c:110:52: error: ‘WindowAggState’ has no member named ‘wincontext’
lwgeom_accum.c: In function ‘PGISDirectFunctionCall1’:
lwgeom_accum.c:304:61: error: macro "InitFunctionCallInfoData" requires 6 arguments, but only 5 given
lwgeom_accum.c:304:9: error: ‘InitFunctionCallInfoData’ undeclared (first use in this function)
lwgeom_accum.c:304:9: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [lwgeom_accum.o] Error 1
make[1]: Leaving directory `/home/user/Downloads/postgis-1.4.2/postgis'
make: *** [postgis] Error 2

Is there some easier way to do this or a good and up to date tutorial out there?

2 Answers 2


I see that Linux Mint 14 is based on Ubuntu 12.10, which probably offers a similar set of packages. If you'd like a little older (but still good) PostGIS 1.5, try installing from packages:

sudo apt-get install postgresql-9.1-postgis

If you want a newer PostGIS 2.0, you will need to build it from source. The reason why your build failed is that you were using a really old PostGIS 1.4, which does not work with PostgreSQL 9.1.

Try using PostGIS 2.0 source build instructions for Ubuntu 12.10.

  • I started all over from scratch and everything went fine. Strange thing is, I know I was using 2.0 because it was written on the archive. Thanks for your help!
    – renosis
    Feb 19, 2013 at 18:55
    # For Ubuntu 11.10 / Linux Mint 12 (with PostGIS 1.5 or above)
    if [ -d "/usr/share/postgresql/9.1/contrib/postgis-1.5" ] 
(change to your own directory)
    createdb -E UTF8 template_postgis -T template0 && \
    ( createlang -d template_postgis -l | grep plpgsql || createlang -d template_postgis plpgsql ) && \
    psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';" && \
    psql -d template_postgis -f $POSTGIS_SQL_PATH/$POSTGIS_SQL && \
    psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql && \
    psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" && \
    psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"
    if [ $GEOGRAPHY -eq 1 ]
        psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.