使用時間機器備份將我運行Leopard的macbook中的文件同步到運行Lion的macbook pro。由於我正在運行sqlite3,因此無法推送到heroku,因此我試圖安裝一個pg gem。錯誤在豹到獅子升級後安裝pg gem和運行服務器
gem install pg
產量:
/Users/taylorjackson/.rvm/rubies/ruby-1.9.2-p136/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
我是一個Unix小白和擔心有什麼東西極其錯誤與通過時光機與64位獅混搭32位豹創建的文件結構。我已採取的步驟到目前爲止。
重新安裝的XCode
Xcode 4.3.3
Build version 4E3002
安裝在XCode的命令行工具的偏好。
與
rvm get head
撞頭靠牆試圖與MacPorts的本地安裝postgre更新爲RVM 1.14.6(主)。卸載的MacPorts和安裝自制
其次從
brew doctor
區域經濟共同體則
釀造安裝PostgreSQL
跑進蟒蛇問題,並隨後建議安裝W/O蟒蛇
brew install --no-python postgresql
似乎得到了一個乾淨的安裝postgresql,BU牛逼從
gem install pg
我的輸出仍然是:
/Users/taylorjackson/.rvm/rubies/ruby-1.9.2-p136/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
也試過
bundle install
和
bundle config build.pg --with-pg-config=/users/taylorjackson/postgresql/bin/pg_config
bundle install
具有相同的結果 我對7小時的生產率哈一無所有。找不到相關的mkmf.log文件。任何其他想法?
編輯:
找到mkmf.log。以下是相關內容:
def have_devel?
unless defined? $have_devel
$have_devel = true
$have_devel = try_link(MAIN_DOES_NOTHING)
end
$have_devel
end
def try_do(src, command, &b)
unless have_devel?
raise <<MSG
The complier failed to generate an executable file.
You have to install development tools first.
MSG
end
begin
src = create_tmpsrc(src, &b)
xsystem(command)
ensure
log_src(src)
rm_rf 'conftest.dSYM'
end
end
關於搜索「gem install Lion」,有很多幾乎相同的問題。在發佈之前你有沒有搜索過,如果是的話,現有的答案沒有幫助? – 2012-07-23 23:45:14
我花了差不多4個小時的時間通過相關的線索,(因此我的長篇初始文章主要來自SE建議)。似乎有很多相關的奇怪的文件結構意外事件 - 所有機器都依賴。在我的情況下,不知怎的,我的postgresql安裝位置創建了一個新的本地用戶(儘管我沒有更改任何默認位置 - 安裝到/ usr/root也許??),並引導gem安裝尋找本地pg安裝在錯誤的地方。重置和刪除用戶(+原始帖子中提到的其他所有內容)將事情設置得筆直。 – TronSawyer 2012-07-24 15:22:39
啊,謝謝。我只問'我已經看到了真正激增的v.similar職位重新對紅寶石pg jem在OSX獅子最近。如果你鏈接到相關的帖子,幫助,尤其是因爲它會幫助其他人遲到找到你的問題。 – 2012-07-25 00:30:07