Error installing extensions in Postgresql 9.2

I tried the following:

sudo -u postgres psql <enter>
create extension "uuid-ossp";

but showing the error: ERROR: could not access file "$libdir/uuid-ossp": No such file or directory

I have tried: select version(). It shows my version of postgresqlPostgreSQL 9.2.4 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1, 64-bit

He later tried to install the extension adminpackwith create extension "adminpack", but he also threw an error:ERROR: could not open extension control file "/usr/local/share/postgresql/extension/adminpack.control": No such file or directory

I tried locate uuid-ossp, which gave me the following result:

/usr/src/postgresql-9.2.4/contrib/uuid-ossp
/usr/src/postgresql-9.2.4/contrib/uuid-ossp/Makefile
/usr/src/postgresql-9.2.4/contrib/uuid-ossp/uuid-ossp--1.0.sql
/usr/src/postgresql-9.2.4/contrib/uuid-ossp/uuid-ossp--unpackaged--1.0.sql
/usr/src/postgresql-9.2.4/contrib/uuid-ossp/uuid-ossp.c
/usr/src/postgresql-9.2.4/contrib/uuid-ossp/uuid-ossp.control
/usr/src/postgresql-9.2.4/doc/src/sgml/uuid-ossp.sgml
/usr/src/postgresql-9.2.4/doc/src/sgml/html/uuid-ossp.html

locate adminpack gives the following result:

/usr/lib/postgresql/9.1/lib/adminpack.so
/usr/share/postgresql/9.1/extension/adminpack--1.0.sql
/usr/share/postgresql/9.1/extension/adminpack.control
/usr/src/postgresql-9.2.4/contrib/adminpack
/usr/src/postgresql-9.2.4/contrib/adminpack/Makefile
/usr/src/postgresql-9.2.4/contrib/adminpack/adminpack--1.0.sql
/usr/src/postgresql-9.2.4/contrib/adminpack/adminpack.c
/usr/src/postgresql-9.2.4/contrib/adminpack/adminpack.control
/usr/src/postgresql-9.2.4/doc/src/sgml/adminpack.sgml
/usr/src/postgresql-9.2.4/doc/src/sgml/html/adminpack.html
+3
source share
2 answers

As you may have guessed, you downloaded PostgreSQL 9.2 sources into /usr/src, unpacked it, configured it, compiled it, and installed ... but no contribution was installed .

If so, from the original PostgreSQL source:

cd contrib && make && sudo make install

PostgreSQL, , / . . http://yum.postgresql.org/, http://apt.postgresql.org/, http://www.postgresql.org/download/,...

. . . uuid-ossp ossp-uuid lib:

apt-get install libossp-uuid-dev

contrib/uuid-ossp:

cd contrib/uuid-ossp && make && make install

make , , , Google. , , .

+4

, Postgresql (, 9.6):

, contrib:

yum install postgresql96-server postgresql96-contrib

postgresql96-server - PostgreSQL, contrib, - , CentOS.

0

All Articles