ruby – 无法安装pg gem
发布时间:2020-12-16 19:28:03 所属栏目:百科 来源:网络整理
导读:试图安装pg gem会给我带来错误. 我正在使用使用rbenv / ruby??-build构建的Ruby 1.9.3-p125.我使用一键安装程序安装了PostgreSQL.我可以使用pgAdmin连接到数据库.我的想法已经不多了. % gem install pg ~Building native extensions. This could take a whil
试图安装pg gem会给我带来错误.
我正在使用使用rbenv / ruby??-build构建的Ruby 1.9.3-p125.我使用一键安装程序安装了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 解决方法
不确定以下哪个步骤最终解决了这个问题.但由于提到mu太短,问题在于混合32位和64位二进制文??件.
> 1,我安装了这个64-bit version of PostgreSQL
> 3,我用Homebrew安装了64位版本的OpenSSL
>最后,在安装pg gem时,我将LDFLAGS更改为指向64位版本的OpenSSL
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |