2011-12-08 68 views
2

我在OSX Lion上安裝PostgreSQL gem時遇到問題。運行gem install pg後,我得到了生成文件後,下面的輸出創建:努力在OSX Lion上安裝pg gem - 「在架構x86_64的文件中缺少必需的體系結構x86_64」

make 
/usr/bin/gcc-4.2 -I. -I/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-darwin11.2.0 -I/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/include -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -o compat.o -c compat.c 
/usr/bin/gcc-4.2 -I. -I/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-darwin11.2.0 -I/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/include -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -o pg.o -c pg.c 
pg.c: In function ‘pgconn_exec’: 
pg.c:947: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c:986: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c: In function ‘pgconn_prepare’: 
pg.c:1052: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c: In function ‘pgconn_exec_prepared’: 
pg.c:1143: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c:1173: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c: In function ‘pgconn_s_escape’: 
pg.c:1317: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c:1324: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c: In function ‘pgconn_send_query’: 
pg.c:1497: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c:1536: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c: In function ‘pgconn_send_prepare’: 
pg.c:1601: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c: In function ‘pgconn_send_query_prepared’: 
pg.c:1690: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c:1721: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c: In function ‘pgconn_wait_for_notify’: 
pg.c:2096: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c: In function ‘pgconn_put_copy_data’: 
pg.c:2166: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c: In function ‘pgconn_block’: 
pg.c:2579: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c:2585: warning: format not a string literal and no format arguments 
pg.c:2600: warning: format not a string literal and no format arguments 
pg.c: In function ‘pgconn_locreate’: 
pg.c:2863: warning: implicit conversion shortens 64-bit value into a 32-bit value 
pg.c: In function ‘find_or_create_johab’: 
pg.c:3933: warning: comparison between signed and unsigned 
pg.c:3939: warning: comparison between signed and unsigned 
pg.c: In function ‘pgconn_get_client_encoding_as_rb_encoding’: 
pg.c:3967: warning: comparison between signed and unsigned 
pg.c: In function ‘pgconn_get_rb_encoding_as_pg_encname’: 
pg.c:3999: warning: comparison between signed and unsigned 
pg.c: In function ‘pgconn_internal_encoding_set’: 
pg.c:4058: warning: comparison between signed and unsigned 
pg.c: In function ‘pgconn_external_encoding’: 
pg.c:4114: warning: comparison between signed and unsigned 
/usr/bin/gcc-4.2 -dynamic -bundle -o pg_ext.bundle compat.o pg.o -L. -L/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/lib -L. -L/usr/local/lib -L/usr/lib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lpq -lpthread -ldl -lobjc 
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 

任何想法?我以前沒有在OSX上使用過Postgre,所以可能是我的安裝問題?

+0

你是如何安裝PostgreSQL的?顯然,ruby預計它的x86_64版本,它看起來像你已經安裝了x86之一。或者當它期待一個胖二進制文件時,它會嘗試鏈接到一個僅支持x86的'libssl'。 – Romain

+0

我不記得說實話了。我的印象是它包含在Lion中作爲默認版本 – Pezholio

+1

選中:它隨附Lion,並且安裝的版本是通用的(x86_64/i386)。你的紅寶石可能不是普遍的,這可能是你的問題。 – Romain

回答

1

看起來您正嘗試在32位計算機上安裝64位版本。檢查以確保您爲您的操作系統下載了正確的版本。

+0

我不記得安裝Postgre。我認爲它現在在Lion上默認包含。 – Pezholio

+0

@Pezholio肯定會與獅子服務器一起,不確定獅子標準,但很有可能。 – Romain

0

我在OS Lion上遇到了同樣的問題。我解決它通過輸入以下(檢查出的PostgreSQL requirements後):

rm Gemfile.lock

brew install readline(我如果這裏需要不知道,但它是一個針對PostgreSQL的依賴,我已經有最先進的最新版本OSSP-UUID的)

brew unlink postgresql

brew install postgresql(這花了大約4分鐘來執行)

bundle install

我希望這可以幫助你!

相關問題