Last active
August 13, 2020 19:16
Revisions
-
ascendbruce revised this gist
May 14, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,7 +35,7 @@ which psql ``` 3. restart your Mac ref: https://stackoverflow.com/questions/7975556/how-to-start-postgresql-server-on-mac-os-x # try 1: switch to old brew -
ascendbruce revised this gist
May 14, 2018 . 1 changed file with 15 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,6 +22,21 @@ psql --version which psql ``` # try 0: restart servers 1. restart with homebrew ``` brew services restart postgresql ``` 2. restart with pg_ctl ``` pg_ctl -D /usr/local/var/postgres stop pg_ctl -D /usr/local/var/postgres start ``` 3. restart your Mac https://stackoverflow.com/questions/7975556/how-to-start-postgresql-server-on-mac-os-x # try 1: switch to old brew ``` -
ascendbruce revised this gist
May 14, 2018 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -47,6 +47,11 @@ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/aa049a47b2 after this, the error message changed but I didn't record it down. ref: * https://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula/17757092#17757092 * https://gist.github.com/srt32/11265183 # try 4: build postgis from source (this works for my case) download source from https://postgis.net/install/ -
ascendbruce revised this gist
May 14, 2018 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,7 +39,15 @@ brew reinstall postgis ref: https://github.com/Homebrew/legacy-homebrew/issues/46358 # try 3: install homebrew in history ``` brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/aa049a47b218fda30f9a4a454119ae067a02cf50/Formula/postgis.rb ``` after this, the error message changed but I didn't record it down. # try 4: build postgis from source (this works for my case) download source from https://postgis.net/install/ -
ascendbruce created this gist
May 14, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,63 @@ # error message ``` PG::InternalError: ERROR: incompatible library "/usr/local/lib/postgresql/postgis-2.4.so": version mismatch DETAIL: Server is version 9.6, library is version 10.0. : CREATE EXTENSION IF NOT EXISTS "postgis" /Users/bruce/Projects/HB-Backend/db/migrate/20151013213623_enable_postgis.rb:3:in `change' -e:1:in `<main>' Caused by: ActiveRecord::StatementInvalid: PG::InternalError: ERROR: incompatible library "/usr/local/lib/postgresql/postgis-2.4.so": version mismatch DETAIL: Server is version 9.6, library is version 10.0. : CREATE EXTENSION IF NOT EXISTS "postgis" ``` # inspect current status ``` brew info postgresql brew info postgis psql --version which psql ``` # try 1: switch to old brew ``` brew info postgis # if found old versions: brew switch postgis 2.4.4_1 ``` # try 2: reinstall postgis ``` brew reinstall postgis ``` ref: https://github.com/Homebrew/legacy-homebrew/issues/46358 # try 3: build postgis from source (this works for my case) download source from https://postgis.net/install/ in my case, it's postgis-2.4.4.tar.gz ``` # change path accordingly brew unlink postgis tar zxf postgis-2.4.4.tar.gz cd postgis-2.4.4 ./configure --with-pgconfig=/usr/local/Cellar/postgresql/9.6.2/bin/pg_config --with-xml2config=/usr/local/Cellar/libxml2/2.9.7/bin/xml2-config make make install ``` ref: * https://gist.github.com/smellman/2e51b1cf449c499ad5deec454a16a7bc * https://github.com/Homebrew/legacy-homebrew/issues/33462