Now I get:
/Library/PostgreSQL/9.0>export ARCHFLAGS='-arch i386'
/Library/PostgreSQL/9.0>sudo -E gem install postgres
Building native extensions. This could take a while...
ERROR: Error installing postgres:
ERROR: Failed to build gem native extension.
extconf.rb:73: command not found: pg_config --bindir
extconf.rb:46: command not found: pg_config --includedir
extconf.rb:53: command not found: pg_config --libdir
checking for main() in -lpq... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
Could not find PostgreSQL build environment (libraries & headers):
Makefile not created
Gem files will remain installed in
/Library/Ruby/Gems/1.8/gems/postgres-0.7.9.2008.01.28 for inspection.
Results logged to
On Fri, Jan 28, 2011 at 5:46 PM, Thom Brown <thom(at)linux(dot)com> wrote:
> On 29 January 2011 01:37, Mike Christensen <mike(at)kitchenpc(dot)com> wrote:
>> I'm trying to install the Postgres gem on OS/X but getting errors no
>> matter what I try.. In theory, it should be as simple as "gem install
>> postgres", correct? Here's what I get:
>>>sudo gem install postgres
>> Building native extensions. This could take a while...
>> ERROR: Error installing postgres:
>> ERROR: Failed to build gem native extension.
>> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
>> extconf.rb:73: command not found: pg_config --bindir
>> =========== WARNING ===========
>> You are building this extension on OS X without setting the
>> ARCHFLAGS environment variable, and PostgreSQL does not appear
>> to have been built as a universal binary. If you are seeing this
>> message, that means that the build will probably fail.
>> Try setting the environment variable ARCHFLAGS
>> to '-arch i386' before building.
>> For example:
>> (in bash) $ export ARCHFLAGS='-arch i386'
>> (in tcsh) $ setenv ARCHFLAGS '-arch i386'
>> Then try building again.
>> extconf.rb:46: command not found: pg_config --includedir
>> extconf.rb:53: command not found: pg_config --libdir
>> checking for main() in -lpq... no
>> *** extconf.rb failed ***
>> Could not create Makefile due to some reason, probably lack of
>> necessary libraries and/or headers. Check the mkmf.log file for more
>> details. You may need configuration options.
>> Provided configuration options:
>> Could not find PostgreSQL build environment (libraries & headers):
>> Makefile not created
>> Gem files will remain installed in
>> /Library/Ruby/Gems/1.8/gems/postgres-0.7.9.2008.01.28 for inspection.
>> Results logged to
>> I have Postgres 9.0 installed at /Library/PostgreSQL/9.0. Any ideas?
> Hi Mike,
> Well the message does advise you to specify the architecture in the
> environment variable.
> export ARCHFLAGS='-arch i386'
> sudo -E gem install postgres
> -E will allow the environment variable survive the sudo call.
> Thom Brown
> Twitter: @darkixion
> IRC (freenode): dark_ixion
> Registered Linux user: #516935
In response to
pgsql-general by date
|Next:||From: Mike Christensen||Date: 2011-01-29 01:54:17|
|Subject: Re: Error trying to install Ruby postgres gems on OS/X|
|Previous:||From: Jasen Betts||Date: 2011-01-29 01:48:58|
|Subject: Re: resizing a varchar column on 8.3.8|