2015-11-22: Actually, looks like I was wrong. /usr/local is NOT protected by System Integrity Protection. I am leaving this post here just for reference, but your user should be able to overwrite and change files in /usr/local. To fix the original issue run: brew link --overwrite postgresql
OS X El Capitan introduced System Integrity Protection (SIP) that broke a lot of programs which required system level changes. If you do any type of postgresql development and use homebrew then likely /usr/local/lib/libpq.5.dylib
is outdated. This could result in errors like the one below…