Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to build pgrouting on ubuntu. Therefore, I now firstly try to create a Postgis database on ubuntu.

I am following the instructions on this site:

Installing PostGIS 1.5 on PostgreSQL 8.4 on Ubuntu

I have installed postgresql and postgis.

I now try to run the necessary sql queries: psql -d my_db -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql

However, I got an error as shown in the screenshot below:

http://postimage.org/image/ggk7xg17p/

It looks like there is a problem with the query as -it firstly aborts the transactions continuously and -then says type "geometry", "box2d", "geometry" cannot be found

I was expecting these variables to occur as a result of this query. Why am I getting such an error while running the query?

Any idea would be more than welcome.

Thanks!


I checked the first error I get on this action:

ERROR Could not access the file "$libdir/postgis-1.5": No such file or directory

I have been checking on Google but not so useful yet. Any idea to fix it?

share|improve this question
    
Your screenshot is not showing the first error. That is the one interesting. The rest is often just a result of the first error. –  Nicklas Avén May 7 '12 at 11:21
    
Stop on the first error by adding -v ON_ERROR_STOP=1 to your psql command; more info –  Mike T May 7 '12 at 11:56
    
Hi Nicklas. As you said, I run it again and captured the first error. It now says: postgres@Bekir-Sony:/home/bekirtopaloglu$ psql -d my_routing -v ON_ERROR_STOP=1 -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql SET BEGIN psql:/usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql:59: ERROR: could not access file "$libdir/postgis-1.5": No such file or directory Any idea? –  Bekir May 8 '12 at 9:08
add comment

1 Answer

i think you have to check your GEOS - (Geometry Engine - Open Source) version. Box Types and Geometries mostly make the problem with old version of GEOS Library...

you can learn your GEOS version from PostGIS with this way :

postgres=# select PostGIS_full_version();
postgis_full_version                                                                  
-------------------------------------------------------------------------------
POSTGIS="2.0.0alpha4SVN" GEOS="3.3.2-CAPI-1.7.2" PROJ="Rel. 4.7.1,
7 September 2011" GDAL="GDAL 1.8.1, released 2011/07/09" LIBXML="2.7.3" USE_STATS
(1 row)

in addition to this you can check this answer...

i hope it helps you...

share|improve this answer
    
Thanks very much for your answer. I tried the command you suggested, it didn't work so I couldn't check my version. However, I have visited the GEOS web site and installed the latest version. [geos-3.3.3.tar.bz2] - However, I still get the same failure on geometry and box types while running sql queries on my database to make it postgis enabled. Any other idea? –  Bekir May 7 '12 at 12:23
    
you can also write this in sql editor area as SELECT PostGIS_full_version(), if geos not works, pls try to uninstall and update your ubuntu then install postgres which will compatible with your ubuntu version.. –  Aragon May 7 '12 at 13:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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