我剛從OS X Lion升級到OS X Mountain Lion。 我的鐵軌環境大部分時間保持完好。pg在山獅上的'0.14.0'失敗
的僅幾步之遙,我不得不做的東西找回來,以良好的狀態是: - 安裝的XCode 4.4 - 安裝的XCode 4.4命令行工具 - 安裝GCC-4.2
所以一切都很順利。
這是問題所在,當我運行軟件包安裝(除了我需要的最重要軟件之一 - postgresql gem'pg')之外,幾乎所有的gem都可以正常安裝。
對於0.12.2以上的版本,它具體失敗。
我使用紅寶石1.9.3p125。我可以成功地抓住0.12.2 pg gem和下面的版本,但它們給了我分段錯誤(我猜是因爲我使用的ruby版本)。
因此,這使我相信它是特定於pg gem,而不是我的整體環境,因爲其他寶石安裝正常。
我也嘗試重新安裝Postgresql,以確保我的postgres環境是好的,在這方面看起來不錯。
有人能夠安裝'pg'寶石版本0.13.0或更高版本(更可取的是0.14.X)?
這裏是我的堆棧跟蹤:
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/Users/caseyli/.rvm/rubies/ruby-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 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 rb_encdb_alias()... yes
checking for rb_enc_alias()... no
checking for PGRES_COPY_BOTH in libpq-fe.h... no
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
pg.c: In function ‘pg_s_library_version’:
pg.c:273: warning: implicit declaration of function ‘PQlibVersion’
pg.c: In function ‘Init_pg_ext’:
pg.c:384: error: ‘PQPING_OK’ undeclared (first use in this function)
pg.c:384: error: (Each undeclared identifier is reported only once
pg.c:384: error: for each function it appears in.)
pg.c:386: error: ‘PQPING_REJECT’ undeclared (first use in this function)
pg.c:388: error: ‘PQPING_NO_RESPONSE’ undeclared (first use in this function)
pg.c:390: error: ‘PQPING_NO_ATTEMPT’ undeclared (first use in this function)
make: *** [pg.o] Error 1
Gem files will remain installed in /Users/caseyli/.rvm/gems/ruby-1.9.3- [email protected]/gems/pg-0.14.0 for inspection.
如何管理PostgreSQL安裝?家釀?如果不是,你真的應該考慮它;我剛剛將'pg'從0.11升級到0.14而沒有麻煩*(並且我也有山獅)* – deefour 2012-07-29 17:37:47
好的建議。我使用的是一鍵式安裝程序。我會嘗試通過自制軟件。 – caseyli 2012-07-30 03:19:38