Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
gem安装pg错误:无法';我不理解kern.osversion`14.0.0';关于Yosemite w/Ruby 2.1.5_Ruby_Macos_Postgresql_Gcc - Fatal编程技术网

gem安装pg错误:无法';我不理解kern.osversion`14.0.0';关于Yosemite w/Ruby 2.1.5

gem安装pg错误:无法';我不理解kern.osversion`14.0.0';关于Yosemite w/Ruby 2.1.5,ruby,macos,postgresql,gcc,Ruby,Macos,Postgresql,Gcc,我使用RVM安装Ruby-2.1.5,并再次运行包。现在pg gem将不安装,我收到以下错误: gem install pg -v '0.17.1' -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config Building native extensions with: '--with-pg-config=/Applications/Postgres.app/Contents/Versi

我使用RVM安装Ruby-2.1.5,并再次运行包。现在pg gem将不安装,我收到以下错误:

gem install pg -v '0.17.1' -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config
Building native extensions with: '--with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config'
This could take a while...
ERROR:  Error installing pg:
    ERROR: Failed to build gem native extension.

    /Users/diego/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20141120-33258-108chh6.rb extconf.rb --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config
Using config values from /Applications/Postgres.app/Contents/Versions/9.3/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 PQescapeLiteral()... yes
checking for PQescapeIdentifier()... 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 PQlibVersion()... yes
checking for PQping()... yes
checking for PQsetSingleRowMode()... yes
checking for rb_encdb_alias()... yes
checking for rb_enc_alias()... yes
checking for rb_thread_call_without_gvl()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_fd_select()... yes
checking for rb_w32_wrap_io_handle()... no
checking for PGRES_COPY_BOTH in libpq-fe.h... yes
checking for PGRES_SINGLE_TUPLE in libpq-fe.h... yes
checking for PG_DIAG_TABLE_NAME in libpq-fe.h... 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 "DESTDIR=" clean

make "DESTDIR="
compiling gvl_wrappers.c
compiling pg.c
compiling pg_connection.c
compiling pg_errors.c
compiling pg_result.c
linking shared-object pg_ext.bundle
couldn't understand kern.osversion `14.0.0'
ld: warning: directory not found for option '-L/Users/mpapis/.sm/pkg/active/lib'
ld: -rpath can only be used when targeting Mac OS X 10.5 or later
collect2: ld returned 1 exit status
make: *** [pg_ext.bundle] Error 1

make failed, exit code 2
我已经通过应用商店将XCode更新为6.1版。我通过自制重新安装了gcc和applegcc-4.2。我还重新安装了Postgres.app。我尝试了建议的解决方案,但没有结果


有人知道下一步该做什么吗?现在我只想回到Ruby-2.1.4,在那里pg安装得很好。

如果在编译
pg
gem之前在您的环境中设置
MACOSX\u部署\u目标=10.9
,共享对象链接应能正常工作。

您是否尝试过
brew update
更新公式和自制程序本身,以及
rvm cleanup all
删除过时的ruby文件夹…?本机扩展通常依赖于可用的系统工具。现在,依赖项必须由xode命令行工具提供。尝试,
xcode选择--install
。这似乎与我尝试的brew更新和rvm清理非常相似。Xcode select是我尝试的第一件事,它只是在退出时显示一条消息,说已经安装,通过软件更新更新。那是后来做的。仍然是相同的错误:(您尝试过PG的0.18.0.pre版本吗?它的来源是什么?我在尝试gem安装该版本时出错:
gem install PG-v'0.18.0.pre'error:找不到有效的gem'PG'(=0.18.0.pre)在任何存储库错误中:可能的备选方案:pg
仅用于
导出MACOSX\u部署\u目标=10.9的记录