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?

-v ON_ERROR_STOP=1to your psql command; more info – Mike Toews May 7 '12 at 11:56