I was installing osm2pgsql with Homebrew, and during the process brew update my Postgres from 10.8 to 11.3. At the end of the process, the upgrade of database failed.
Error: Upgrading postgresql data from 10 to 11 failed! ==> Removing empty postgresql initdb database... ==> Moving postgresql data back from /usr/local/var/postgres.old to /usr/local/v ==> Successfully started `postgresql` (label: homebrew.mxcl.postgresql) Error: Failure while executing; `/usr/local/opt/postgresql/bin/pg_upgrade -r -b /usr/local/Cellar/postgresql@10/10.8/bin -B /usr/local/opt/postgresql/bin -d /usr/local/var/postgres.old -D /usr/local/var/postgres -j 12` exited with 1.
I receive this message in the log file:
"pg_dump: [archiver (db)] query failed: ERROR: could not access file “$libdir/postgis-2.4”: No such file or directory"
I am on mac and not really good with terminal. Could anyone help me get my database back?