2016-09-23 111 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生成失敗奇數的消息沒有這一步同意。