Problems installing postgres and ruby-postgres after Leopard upgrade
October 28, 2007
Unwinding macports to use Apple’s ruby stack I found that
sudo port install postgresql82 postgresql82-server
fails. Able to install from source with the same configuration settings. Missing optional stuff like tsearch2 though.
More of a concern is the problems installing
sudo gem install ruby-postgres. The first problem is that configure doesn’t find certain functions due to problems linking to the ppc symbols. The ARCHFLAGS="-arch i386" doesn’t solve this - still builds for ppc as well. Can override #defines in the postgres.c file and override the contents of the Makefile to build successfully though.
Update ARCHFLAGS does work in compiling ruby-postgres, I just had to be more sophisticated about passing it through sudo.
October 28, 2007 at 5:36 pm
This bug here covers the postgresql82 macports issue: http://trac.macports.org/projects/macports/ticket/12994
November 7, 2007 at 12:47 pm
What was the final sudo command you ran to get it to work?
November 26, 2007 at 7:16 am
Here is the answer! There is a much easier way to install PostgreSQL on Leopard, without compiling yourself or using the MacPort.
http://www2.russbrooks.com:8080/2007/11/4/install-postgresql-on-mac-os-x-10-5-leopard
December 17, 2007 at 6:47 am
Jeff: The command should look something like this:
sudo env ARCHFLAGS=”-arch i386″ gem install ruby-postgres
January 23, 2008 at 11:32 am
Thanks Jason. That command saved me.
May 15, 2008 at 5:49 am
Thank you for the tutorital, but in my case it wont work so….. I got a compilation error during the make session… ;-O