1

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?

underdark
84.9k22 gold badges237 silver badges418 bronze badges
asked May 7, 2012 at 10:44
3
  • Your screenshot is not showing the first error. That is the one interesting. The rest is often just a result of the first error. Commented May 7, 2012 at 11:21
  • Stop on the first error by adding -v ON_ERROR_STOP=1 to your psql command; more info Commented May 7, 2012 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? Commented May 8, 2012 at 9:08

1 Answer 1

1

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...

answered May 7, 2012 at 11:17
2
  • 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? Commented May 7, 2012 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.. Commented May 7, 2012 at 13:21

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.