I’ve installed PostgreSQL using MacPorts on a couple of different computers, no problem, but when it comes to my own laptop, I cannot get it to build.
When I do this command:
sudo port install postgresql83
I get this error:
checking test program... failed configure: error: Could not execute a simple test program. This may be a problem related to locating shared libraries. Check the file 'config.log' for the exact reason. Error: The following dependencies failed to build: postgresql83 Error: Status 1 encountered during processing.
The config.log file is 7000 lines long with no obvious problems that I can see (it says ‘exit 1’ on the last line, though!).
I do have the developer tools and what not installed and I have updated to the latest version of MacPorts and sync’ed my ports tree. I can install other things via MacPorts.
I’ve Googled in vain for details on what this means. Any suggestions? Thanks!
UPDATE: I think this is what is causing it to fail (from config.log):
configure:8307: ./conftest dyld: Library not loaded: /opt/local/lib/libxml2.2 Referenced from: /opt/local/lib/libxslt.1.dylib Reason: image not found
I have libxml2 installed but maybe it’s screwed up. I uninstalled libxml2 and libxslt and am re-installing them fresh, so we’ll see what happens.
This was the key:
This was not near the bottom of the config.log, it was at about line 700.
Despite the fact that I’d already upgraded libxml to the appropriate version (which has been a problem I’ve had to address previously when installing postgresql) it was not working with libxslt.
I uninstalled libxml (both versions I had installed) and libxslt and then installed postgresql again, and this time it was able to build.
If you get an error like this building postgresql, check out libraries.
BTW, the config.log file can be found in a location like this: