Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails Postgis Upgrade Issues

I have installed Postgis and Postgresql through Homebrew on my Mac, and I wanted to upgrade my version of Postgis to 2.1.0-rc2. I unlinked my version of postgis, and then edited the postgis homebrew formula. After the new formula did not compile, I relinked the old formula and I now receive the following error whenever I try to invoke a database table with a spatial column:.

PG::UndefinedFile: ERROR:  could not load library 
"/usr/local/Cellar/postgresql/9.2.4/lib/postgis-2.0.so":   
dlopen(/usr/local/Cellar/postgresql/9.2.4/lib/postgis-2.0.so, 10): Symbol not found: 
_json_tokener_errors
Referenced from: /usr/local/Cellar/postgresql/9.2.4/lib/postgis-2.0.so
Expected in: /usr/local/lib/libjson.0.dylib
in /usr/local/Cellar/postgresql/9.2.4/lib/postgis-2.0.so

(I was not having this problem prior to doing the above action) I have restarted my postgresql server, and that did not work. I am unsure of what to do to solve this issue.

like image 937
tomciopp Avatar asked Aug 06 '13 04:08

tomciopp


1 Answers

Ah! Fixed the issue by reverting to an older version of json-c that homebrew had linked. (specifically json-c 0.10) it was as simple as the following command:

brew switch json-c 0.10

Hope someone else may find this useful in the future.

like image 78
tomciopp Avatar answered Nov 11 '22 04:11

tomciopp