@Tim I hope you see this to fix/add an extra missing step to the pgcrypto extention creation in the domcumentation so no user will face the warning message Jeff posted if the user chose to create the extention on the dspace database instead of adding it to a schema.
Executing psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;" alone won't work unless the search_path is set to include the pgcrypto extention in it. # This should work 1) psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;" 2) psql --username=postgres dspace -c 'ALTER ROLE dspace IN DATABASE dspace SET search_path = "$user",public,extensions,pgcrypto;' 3) psql --username=postgres dspace -c 'SHOW search_path;' # Or this one 1) psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;" 2) psql --username=postgres dspace -c 'ALTER DATABASE dspace SET search_path = "$user",public,extensions,pgcrypto;' 3) psql --username=postgres dspace -c 'SHOW search_path;' # Or this one if the search path is set globally in the main postgresql configuration file. 1) vi /path-to/postgresql.conf search_path = '$user",public,extensions,pgcrypto' # Or this one if the dspace script/scripts sets the search_path in them (SET search_path = "$user",public,extensions,pgcrypto;). 1) psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;" Trying to help. On Sunday, December 4, 2022 at 4:26:32 AM UTC+3 Mohammad S. AlMutairi wrote: > Hi Jeff, > > It is created but it can not be found because it's not included in the > search path. One way of fixing this is to create a schema for all > extensions first and then create the pgcrypto extension and add it to that > schema. Just follow the steps you see below to pass the error. > > 1) su - postgres > 2) createuser --username=postgres --no-superuser --pwprompt dspace > 3) createdb --username=postgres --owner=dspace --encoding=UNICODE dspace > 4) psql --username=postgres dspace > 5) CREATE SCHEMA extensions; > 6) CREATE EXTENSION pgcrypto SCHEMA extensions; > 7) GRANT USAGE ON SCHEMA extensions TO dspace; > 8) SELECT set_config('search_path',current_setting('search_path') || > ',extensions',false) WHERE current_setting('search_path') !~ > '(^|,)extensions(,|$)'; > 9) SHOW search_path; > 10) ALTER DATABASE dspace SET search_path FROM CURRENT; > 11) \q > 12) exit > > Good luck > On Friday, December 2, 2022 at 8:49:34 PM UTC+3 Jeff Mitchell wrote: > >> Just to clarify I had run this already and restarted PSQL as well before >> running the build and install >> >> # Login to the database as a superuser, and enable the pgcrypto extension >> on this database >> psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;" >> On Friday, December 2, 2022 at 11:19:20 AM UTC-6 Jeff Mitchell wrote: >> >>> Hello all, >>> >>> I just finished the build section of the configuration but when I got to >>> run the ant fresh_install I get: >>> >>> [java] WARNING: Required PostgreSQL 'pgcrypto' extension is NOT >>> INSTALLED on this database. >>> >>> [java] >>> [java] ** DSpace REQUIRES PostgreSQL >= 9.4 AND pgcrypto extension >>> >= 1.1 ** >>> >>> However, when I check to see what extensions are installed it shows me >>> that pgcrypto 1.3 is installed and yes I installed it as postgres and >>> dspace db users. I'm running PSQL 13 if that helps. >>> >>> Thanks in advance! >>> >>> Jeff >>> >>> -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/7687d570-43e0-4a24-8a8c-40e13726e311n%40googlegroups.com.