2016-09-23 101 views
1

我不能使它工作,我尝试在计算器上几乎所有的解决方案,我想:无法安装PG宝石OS X 10.11.6,导轨5​​,红宝石2.3

  1. 安装/卸载PostgreSQL用于自制
  2. 指定配置文件gem install pg -- --with-pg-config=/usr/local/bin/pg_config
  3. 删除PostgreSQL用于自制--force和安装postgres.app
  4. 其次postgres.app文档使用以下命令进行安装:sudo ARCHFLAGS="-arch x86_64" gem install pg
  5. 的Spe postgres.app sudo ARCHFLAGS="-arch x86_64" gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.5/bin/pg_config的cifying PG配置文件

什么工作,错误总是相同的,日志不显示任何有用的东西......

Estebans-MacBook-Air:collegefundme Esteban.E$ sudo env ARCHFLAGS='-arch x86_64' gem install pg 
Building native extensions. This could take a while... 
ERROR: Error installing pg: 
    ERROR: Failed to build gem native extension. 

    current directory: /Users/Esteban.E/.rvm/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.19.0/ext 
/Users/Esteban.E/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160922-42901-114ix77.rb extconf.rb 
checking for pg_config... yes 
Using config values from /Applications/Postgres.app/Contents/Versions/latest/bin/pg_config 
checking for libpq-fe.h... yes 
checking for libpq/libpq-fs.h... yes 
checking for pg_config_manual.h... yes 
checking for PQconnectdb() in -lpq... yes 
checking for PQconnectionUsedPassword()... yes 
checking for PQisthreadsafe()... yes 
checking for PQprepare()... yes 
checking for PQexecParams()... yes 
checking for PQescapeString()... yes 
checking for PQescapeStringConn()... yes 
checking for PQescapeLiteral()... yes 
checking for PQescapeIdentifier()... yes 
checking for PQgetCancel()... yes 
checking for lo_create()... yes 
checking for pg_encoding_to_char()... yes 
checking for pg_char_to_encoding()... yes 
checking for PQsetClientEncoding()... yes 
checking for PQlibVersion()... yes 
checking for PQping()... yes 
checking for PQsetSingleRowMode()... yes 
checking for PQconninfo()... yes 
checking for PQsslAttribute()... yes 
checking for rb_encdb_alias()... yes 
checking for rb_enc_alias()... no 
checking for rb_thread_call_without_gvl()... yes 
checking for rb_thread_call_with_gvl()... yes 
checking for rb_thread_fd_select()... yes 
checking for rb_w32_wrap_io_handle()... no 
checking for rb_str_modify_expand()... yes 
checking for rb_hash_dup()... yes 
checking for PGRES_COPY_BOTH in libpq-fe.h... yes 
checking for PGRES_SINGLE_TUPLE in libpq-fe.h... yes 
checking for PG_DIAG_TABLE_NAME in libpq-fe.h... yes 
checking for struct pgNotify.extra in libpq-fe.h... yes 
checking for unistd.h... yes 
checking for inttypes.h... yes 
checking for ruby/st.h... yes 
checking for C99 variable length arrays... yes 
creating extconf.h 
creating Makefile 

To see why this extension failed to compile, please check the mkmf.log which can be found here: 

    /Users/Esteban.E/.rvm/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0/pg-0.19.0/mkmf.log 

current directory: /Users/Esteban.E/.rvm/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.19.0/ext 
make "DESTDIR=" clean 
/Users/Esteban.E/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems.rb:270:in `find_spec_for_exe': can't find gem make (>= 0.a) (Gem::GemNotFoundException) 
    from /Users/Esteban.E/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems.rb:298:in `activate_bin_path' 
    from /Users/Esteban.E/.rvm/gems/ruby-2.3.1/bin/make:22:in `<main>' 
    from /Users/Esteban.E/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval' 
    from /Users/Esteban.E/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>' 

current directory: /Users/Esteban.E/.rvm/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.19.0/ext 
make "DESTDIR=" 
/Users/Esteban.E/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems.rb:270:in `find_spec_for_exe': can't find gem make (>= 0.a) (Gem::GemNotFoundException) 
    from /Users/Esteban.E/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems.rb:298:in `activate_bin_path' 
    from /Users/Esteban.E/.rvm/gems/ruby-2.3.1/bin/make:22:in `<main>' 
    from /Users/Esteban.E/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval' 
    from /Users/Esteban.E/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>' 

make failed, exit code 1 

Gem files will remain installed in /Users/Esteban.E/.rvm/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.19.0 for inspection. 
Results logged to /Users/Esteban.E/.rvm/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0/pg-0.19.0/gem_make.out 

我花了很多时间试图自己解决,任何帮助将不胜感激。

+0

你可以试试'gem update --system',看看有没有什么区别? – kobaltz

+0

拉起终端会话并运行'brew doctor'。我敢打赌它抱怨说你的xcode命令行工具已经过时了。 – MarsAtomic

+0

我做了'gem update --system'没有改变日志是一样的,我也做过'酿造医生'甚至'brew update',但仍然是相同的= / – SsouLlesS

回答

2

如果最后的宝石皮克后升级Xcode的安装/升级,你应该在Xcode许可证

sudo xcodebuild -license

不幸的是PG生成失败奇数的消息没有这一步同意。