2011-12-08 5 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でPostgreSQLを使用していなかったので、私のインストールに問題があるかもしれませんか?

+0

PostgreSQLをどのようにインストールしましたか?明らかに、Rubyはx86_64バージョンのものを期待しています。あなたがx86をインストールしたように見えます。または、fatバイナリを期待しているときに、x86専用の 'libssl'とリンクしようとします。 – Romain

+0

私は正直であることを覚えていません。私はそれがLionにデフォルトで組み込まれているという印象を受けました – Pezholio

+1

Checked:Lionと共に出荷され、インストールされているバージョンはUniversal(x86_64/i386)です。あなたのルビーはおそらく普遍的なものではないでしょう、それはおそらくあなたの問題です。 – Romain

答えて

1

32ビットマシンに64ビットバージョンをインストールしようとしているようです。お使いのOSに適したバージョンをダウンロードしたことを確認してください。

+0

PostgreSQLのインストールは覚えていません。私はこれがデフォルトでライオンに含まれていると思います。 – Pezholio

+0

@Pezholio間違いなく、Lion Serverは提供されていますが、Lionの標準についてはわかりませんが、その可能性は非常に高いです。 – Romain

0

OS Lionでこれと全く同じ問題が発生しました。私は、(PostgreSQLのrequirementsをチェックアウトした後に)次のように入力して、それを解決:

rm Gemfile.lock

brew install readline(私はこれがここで必要とされているかどうかわからないんだけど、それはPostgreSQLの依存関係であると私はすでに持っていました最新のOSSP-UUIDのバージョン)

brew unlink postgresql

brew install postgresql(これは実行に約4分かかった)

bundle install

私はこれがあなたを助けてくれることを願っています!

関連する問題