I installed postgresql 9.1.12 using sudo apt-get install postgresql-9.1 postgresql-9.1-contrib postgresql-9.1-postgis
and created databse "mydb". Then extended the mydb using
psql -h localhost -d mydb -U abc -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
psql -h localhost -d mydb -U abc -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql
I want to install pg routing to "mydb" in my ubuntu 12.04 machine.
I tried this psql mydb -c "create extension pgrouting"
but got error
ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/pgrouting.control": No such file or directory
Then downloaded pgrouting-1.05.tar.gz from http://pgrouting.org/download.html but don't know how to install to an existing db.