2

When installing pg I get the following error:

*** 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.

When I check mkmf.log, it shows the following issue:

    find_executable: checking for pg_config... -------------------- yes

--------------------

"xcrun clang -o conftest -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin13 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.3.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/Cellar/postgresql/9.3.2/lib -L. -L/usr/local/lib  -Wno-error=unused-command-line-argument-hard-error-in-future gem install json   -lruby.2.0.0  -lpthread -ldl -lobjc "
clang: error: no such file or directory: 'gem'
clang: error: no such file or directory: 'install'
clang: error: no such file or directory: 'json'
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

I have tried copying and pasting the failing command into the terminal, and I get the same error. I have no idea what this error means or why it happens. Any suggestions?

  • 1
    Did you recently upgrade to OS X Mavericks? http://stackoverflow.com/questions/19625487/impossible-to-install-pg-gem-on-my-mac-with-mavericks – Goro Apr 02 '14 at 20:32
  • Yes, I recently upgraded to Mavericks. Your linked solution worked. Thanks! If you want to answer this question I will accept, up to you :) –  Apr 02 '14 at 21:19

0 Answers0