2012-03-23 11 views
8

पीजी मणि स्थापित करने की कोशिश करने से मुझे त्रुटियां मिलती हैं।पीजी मणि स्थापित करने में समस्या

मैं आरबीएनवी/रूबी-बिल्ड का उपयोग कर रूबी 1.9.3-पी 125 का उपयोग कर रहा हूं। मैं एक-क्लिक इंस्टॉलर का उपयोग PostgreSQL स्थापित। मैं pgAdmin का उपयोग कर डीबी से कनेक्ट करने में सक्षम हूं। मैं विचारों से बाहर चला रहा हूँ।

% gem install pg                                                  ~ 
Building native extensions. This could take a while... 
ERROR: Error installing pg: 
    ERROR: Failed to build gem native extension. 

     /Users/sandropadin/.rbenv/versions/1.9.3-p125/bin/ruby extconf.rb 
checking for pg_config... yes 
Using config values from /usr/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 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 rb_encdb_alias()... yes 
checking for rb_enc_alias()... yes 
checking for struct pgNotify.extra in libpq-fe.h... yes 
checking for unistd.h... yes 
checking for ruby/st.h... yes 
creating extconf.h 
creating Makefile 

make 
compiling pg.c 
compiling pg_connection.c 
pg_connection.c: In function ‘pgconn_wait_for_notify’: 
pg_connection.c:1986: warning: ‘rb_thread_select’ is deprecated (declared at /Users/sandropadin/.rbenv/versions/1.9.3-p125/include/ruby-1.9.1/ruby/intern.h:379) 
pg_connection.c: In function ‘pgconn_block’: 
pg_connection.c:2512: warning: ‘rb_thread_select’ is deprecated (declared at /Users/sandropadin/.rbenv/versions/1.9.3-p125/include/ruby-1.9.1/ruby/intern.h:379) 
compiling pg_result.c 
linking shared-object pg_ext.bundle 
ld: in /usr/local/lib/libssl.0.9.8.dylib, missing required architecture x86_64 in file for architecture x86_64 
collect2: ld returned 1 exit status 
make: *** [pg_ext.bundle] Error 1 


Gem files will remain installed in /Users/sandropadin/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/pg-0.13.2 for inspection. 
Results logged to /Users/sandropadin/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/pg-0.13.2/ext/gem_make.out 
+2

कहाँ से अपने libssl मिला? लगता है जैसे आप 32 बिट और 64 बिट बाइनरी मिश्रण करने की कोशिश कर रहे हैं। –

+0

मैं सिर्फ 'काढ़ा – Sandro

+0

openssl' स्थापित मुझे लगता है कि आप दो मिश्रण के बारे में सही कर रहे हैं का उपयोग करने से लगता है, लेकिन अगर यह संभव है या कैसे openssl निर्माण करने के लिए 64-बिट – Sandro

उत्तर

14

सुनिश्चित नहीं है कि निम्न में से किन कदमों ने अंततः इस समस्या को मंजूरी दे दी है। लेकिन जैसे-जैसे म्यू बहुत छोटा उल्लेख किया गया है, समस्या 32bit और 64bit बाइनरी मिश्रण किया गया था।

  • 1, मैं स्थापित इस 64-bit version of PostgreSQL
  • 2, मैं किसी भी पुराने Homebrew OpenSSL स्थापना

    $ काढ़ा स्थापना रद्द करें openssl

  • 3, मैं 64-बिट स्थापित की स्थापना रद्द होमब्री

    के साथ ओपनएसएसएल का संस्करण

    $ शराब बनाना स्थापित --64-बिट openssl

  • अन्त में, जब स्नातकोत्तर मणि स्थापित करने, मैं LDFLAGS 64-बिट स्थापित स्नातकोत्तर OpenSSL

    के संस्करण

    $ मणि को इंगित करने के लिए बदल - --with-LDFLAGS = '- एल/usr/स्थानीय/सेलर/openssl/0.9.8s'

+1

के रूप में मैं कहना होगा कि मैं Homebrew मजबूर करने के लिए मैं नहीं जानता 'पीजी' मणि को लगभग 6 महीने तक शेर की मेरी प्रति पर संकलित करने के लिए संघर्ष कर रहा है। अब यह जवाब साथ आया, और मैं एक चैंप की तरह रेल 3.2 + PostgreSQL चलाने में सक्षम हूँ। धन्यवाद! –

+1

यह मेरे लिए माउंटेन शेर, रूबी 1.9.3p194 (2012-04-20 संशोधन 35410) पर काम करता है [x86_64-darwin12.0.0]। मैंने 'brew install postgresql' का उपयोग किया था, और पहले से ही openssl नहीं था, तो बस' brew इंस्टॉल करें --64-बिट openssl' और फिर इसे प्रदान किए गए एलडीएफएलजीएस का उपयोग किया। – thugsb

+0

खुलता है, ओपनएसएल के संस्करण को छोड़कर (अब 1.0.1 सी पर) चला गया है। उपयोगकर्ता को उनके संस्करण संख्या –