Trouble with installing additional modules on Postgresql 9.1 on ALT-Linux I'm trying to create extension under postgresql 9.1 (Linux):

CREATE EXTENSION pg_trgm;


but got error:

ERROR:  could not open extension control file "/usr/share/pgsql/extension/pg_trgm.control": No such file or directory


This file exists and has r/w permissions for all users:

[root@postgresql extension]# pwd
/usr/share/pgsql/extension
[root@postgresql extension]# ls -l | grep pg_trgm
-rwxrwxrwx 1 root root  4977 Apr  6  2013 pg_trgm--1.0.sql
-rwxrwxrwx 1 root root  4230 Apr  6  2013 pg_trgm--unpackaged--1.0.sql
-rwxrwxrwx 1 root root   177 Apr  6  2013 pg_trgm.control


How to solve this problem?
In this particular situation what did help me:

It was needed just to copy extension directory from /usr/share/pgsql/extension/ to /var/lib/pgsql-root/usr/lib/pgsql/extension/.

That's all folks.