2016-09-02 6 views
5

पर गहरे लाल रंग का के लिए स्नातकोत्तर स्थापित Postgresql पर OSX स्थापित नहीं होगा यहाँ, जबकि स्नातकोत्तर (0.18.4) स्थापित करने के लिए नीचे दिए गएमणि रेल

n त्रुटि मेरे डेटा हुआ है, और Bundler जारी नहीं रख सकते। सुनिश्चित करें कि gem install pg -v '0.18.4' बंडलिंग से पहले सफल होता है। क्रिसिस-मैकबुक-प्रो: चमक chriswilson $ बंडल निष्पादन उपयोग स्थापित करें: [-bCcpSsv] [-B प्रत्यय] [-f झंडे] [-g समूह] [-एम मोड] [-o स्वामी] फ़ाइल 1 फ़ाइल 2 स्थापित करें [-बीसीसीपीएसएसवी] [-बी प्रत्यय] [-एफ झंडे] [-जी समूह] [-एम मोड] [-o मालिक] file1 ... fileN निर्देशिका install -d [-v] [-g समूह] [-एम मोड] [-o मालिक] निर्देशिका ... क्रिसिस-मैकबुक-प्रो: चमक chriswilson $ मणि स्थापित pg -v '0.18.4' देशी एक्सटेंशन का निर्माण। इसमें कुछ समय लग सकता है ... त्रुटि: पीजी स्थापित करने में त्रुटि: त्रुटि: मणि देशी एक्सटेंशन बनाने में विफल।

current directory: /Users/chriswilson/.rvm/gems/ruby-2.3.0/gems/pg-0.18.4/ext 
/Users/chriswilson/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160902-1617-e1qwb1.rb extconf.rb 
checking for pg_config... no 
No pg_config... trying anyway. If building fails, please try again with 
--with-pg-config=/path/to/pg_config 
checking for libpq-fe.h... no 
Can't find the 'libpq-fe.h header 
*** 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: 
    --with-opt-dir 
    --with-opt-include 
    --without-opt-include=${opt-dir}/include 
    --with-opt-lib 
    --without-opt-lib=${opt-dir}/lib 
    --with-make-prog 
    --without-make-prog 
    --srcdir=. 
    --curdir 
    --ruby=/Users/chriswilson/.rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME) 
    --with-pg 
    --without-pg 
    --enable-windows-cross 
    --disable-windows-cross 
    --with-pg-config 
    --without-pg-config 
    --with-pg_config 
    --without-pg_config 
    --with-pg-dir 
    --without-pg-dir 
    --with-pg-include 
    --without-pg-include=${pg-dir}/include 
    --with-pg-lib 
    --without-pg-lib=${pg-dir}/lib 

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

    /Users/chriswilson/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-15/2.3.0/pg-0.18.4/mkmf.log 

extconf failed, exit code 1 

Gem files will remain installed in /Users/chriswilson/.rvm/gems/ruby-2.3.0/gems/pg-0.18.4 for inspection. 
Results logged to /Users/chriswilson/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-15/2.3.0/pg-0.18.4/gem_make.out 
chriss-MacBook-Pro:shine chriswilson$ gem install pg -v '0.18.4' 
Building native extensions. This could take a while... 
ERROR: Error installing pg: 
    ERROR: Failed to build gem native extension. 

    current directory: /Users/chriswilson/.rvm/gems/ruby-2.3.0/gems/pg-0.18.4/ext 
/Users/chriswilson/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160902-1643-jfhxyo.rb extconf.rb 
checking for pg_config... no 
No pg_config... trying anyway. If building fails, please try again with 
--with-pg-config=/path/to/pg_config 
checking for libpq-fe.h... no 
Can't find the 'libpq-fe.h header 
*** 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: 
    --with-opt-dir 
    --with-opt-include 
    --without-opt-include=${opt-dir}/include 
    --with-opt-lib 
    --without-opt-lib=${opt-dir}/lib 
    --with-make-prog 
    --without-make-prog 
    --srcdir=. 
    --curdir 
    --ruby=/Users/chriswilson/.rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME) 
    --with-pg 
    --without-pg 
    --enable-windows-cross 
    --disable-windows-cross 
    --with-pg-config 
    --without-pg-config 
    --with-pg_config 
    --without-pg_config 
    --with-pg-dir 
    --without-pg-dir 
    --with-pg-include 
    --without-pg-include=${pg-dir}/include 
    --with-pg-lib 
    --without-pg-lib=${pg-dir}/lib 

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

    /Users/chriswilson/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-15/2.3.0/pg-0.18.4/mkmf.log 

extconf failed, exit code 1 

Gem files will remain installed in /Users/chriswilson/.rvm/gems/ruby-2.3.0/gems/pg-0.18.4 for inspection. 
Results logged to /Users/chriswilson/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-15/2.3.0/pg-0.18.4/gem_make.out 



find_executable: checking for pg_config... -------------------- no 

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

find_header: checking for libpq-fe.h... -------------------- no 

"gcc -o conftest -I/Users/chriswilson/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/x86_64-darwin15 -I/Users/chriswilson/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/ruby/backward -I/Users/chriswilson/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe conftest.c -L. -L/Users/chriswilson/.rvm/rubies/ruby-2.3.0/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib  -lruby.2.3.0 -lpthread -ldl -lobjc " 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: int main(int argc, char **argv) 
4: { 
5: return 0; 
6: } 
/* end */ 

"gcc -E -I/Users/chriswilson/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/x86_64-darwin15 -I/Users/chriswilson/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/ruby/backward -I/Users/chriswilson/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe conftest.c -o conftest.i" 
conftest.c:3:10: fatal error: 'libpq-fe.h' file not found 
#include <libpq-fe.h> 
     ^
1 error generated. 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <libpq-fe.h> 
/* end */ 

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

उत्तर

10

इसका मूल रूप से मतलब है कि आप अपने सेटअप पर लाइब्रेरी या प्रोग्राम खो रहे हैं।

brew install libpqxx 
gem install pg 

:

एक आम लापता पुस्तकालय स्थापित करें: मैं इस मुद्दे को एक दो बार अब तो यहाँ कुछ अलग बातें की कोशिश करने के (उम्मीद उनमें से एक आप के लिए काम करेंगे) कर रहे हैं मिला है पुनर्स्थापित postgres (आदर्श नहीं मुझे पता है):

brew uninstall postgresql 
brew install postgresql 
gem install pg 

स्पष्ट रूप pg_config के मार्ग को परिभाषित:

1) pg_config के स्थान हासिल

which pg_config 

2) मणि में उस पथ

gem install pg --with-pg-config=/usr/pgsql-9.1/bin/pg_config 
+0

स्थापित MacPorts लोगों के लिए पारित: 'मणि स्थापित स्नातकोत्तर - --with-PG-config =/ऑप्ट/लोकल/lib/postgresql [संस्करण संख्या]/bin/pg_config' – PartialOrder

संबंधित मुद्दे