postgresql-12-rum package failed to install
siniypin opened this issue · 4 comments
Can not install RUM extension with postgresql 12, Ubuntu 18.04, postgresql 12 apt pkg.
sudo apt-get install postgresql-12-rum
psql DB -c "CREATE EXTENSION rum;"
psql: error: could not connect to server: FATAL: role "root" does not exist
OK, I create role root..
psql DB -c "CREATE EXTENSION rum;"
ERROR: could not open extension control file "/usr/share/postgresql/10/extension/rum.control": No such file or directory
OK, I move all rum files to /usr/share/postgresql/10/extension/
psql DB -c "CREATE EXTENSION rum;"
ERROR: could not access file "$libdir/rum": No such file or directory
OK I move the rum.so file from /usr/lib/postgresql/12/lib to /usr/lib/x86_64-linux-gnu/rum/
psql DB -c "CREATE EXTENSION rum;"
ERROR: could not access file "$libdir/rum": No such file or directory
OK, I replace $libdir in control file to a full absolute path
psql DB -c "CREATE EXTENSION rum;"
ERROR: could not load library "/usr/lib/x86_64-linux-gnu/rum.so": /usr/lib/x86_64-linux-gnu/rum.so: undefined symbol: rbt_begin_iterate
OK, I give up.
Same story with installation from github repo
Hello.
You obviously confused rum.so PostgreSQL 12 with PostgreSQL 10.
psql DB -c "CREATE EXTENSION rum;"
psql: error: could not connect to server: FATAL: role "root" does not exist
Use psql -U postgres DB -c "CREATE EXTENSION rum;"
psql DB -c "CREATE EXTENSION rum;"
ERROR: could not open extension control file "/usr/share/postgresql/10/extension/rum.control": No such file or directory
Most likely you are connected to PostgreSQL 10.
Check version:
psql -U postgres "SELECT version();"
psql DB -c "CREATE EXTENSION rum;"
ERROR: could not load library "/usr/lib/x86_64-linux-gnu/rum.so": /usr/lib/x86_64-linux-gnu/rum.so: undefined symbol: rbt_begin_iterate
Connected to PostgreSQL 10, rum.so compiled for PostgreSQL 12.
Damn, you're right! It says "PostgreSQL 10.10 ...", which confuses me even more. Why on bloody earth did I end up with db engine v.10 after installing postgresql-12? (Note: I'd followed all instructions from https://www.postgresql.org/download/linux/ubuntu/)
apt-get install postgresql-12
...
Creating new PostgreSQL cluster 12/main ...
/usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main --auth-local peer --auth-host md5
...
Success. You can now start the database server using:
/usr/lib/postgresql/12/bin/pg_ctl -D /var/lib/postgresql/12/main -l logfile start
...
sudo -u postgres psql
psql (12.0 (Ubuntu 12.0-1.pgdg18.04+1), server 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1))
OK, did everything from scratch and it worked like a charm. @degtyaryov спасибо!