- Edited
Hello, I'm new to managing databases and need to use uuid-ossp
extension but I'm not sure how to do this.
Using CentOS Linux release 7.8.2003 (Core)
I installed PostgreSQL Manager then PgSQL version 11.0.
After that I installed the postgresql-contrib to the system with yum install postgresql-contrib
in order to have uuid-ossp
extension available.
Then I created a database uuidtest.
Using the ssh from files, I did the following:
logged in as postgres to psql: sudo -i -u postgres
,
SELECT * FROM pg_available_extensions;
All I got was this:
plpgsql | 1.0 | 1.0 | PL/pgSQL procedural language
So I decided to copy the files from the /usr/share/pgsql/extension to /www/server/pgsql/share/extension
Then I run the SELECT * FROM pg_available_extensions;
again and everything was there.
From there I thought I would be able to install the extension so I selected the schema I need it to be active: \c uuidtest
and ran the create extension command.
I got this error:
uuidtest=# CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
ERROR: could not access file "$libdir/uuid-ossp": No such file or directory
I also copied the libuuid.so: cp /usr/lib64/libuuid.so* /www/server/pgsql/lib/
, but it didn't work either.
How can I fix this?