首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >"bundle update“无法安装带有本机扩展的pg (0.14.1)

"bundle update“无法安装带有本机扩展的pg (0.14.1)
EN

Stack Overflow用户
提问于 2013-02-14 03:00:28
回答 1查看 811关注 0票数 0

我运行了bundle update (这样我就可以安装rails了),但是得到了这个错误:

代码语言:javascript
代码运行次数:0
运行
复制
$ bundle update
..... < other stuff ....>
Installing pg (0.14.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/user/.rvm/rubies/ruby-1.9.3-p374/bin/ruby extconf.rb 
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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.

我对Ruby和所有这些都是新手,有人能告诉我这里出了什么问题吗?这是在OSX上

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-02-14 03:04:14

确保先安装postgres。我建议你通过Mac包管理器homebrew来做这件事。

代码语言:javascript
代码运行次数:0
运行
复制
brew install postgresql

关于如何在Mac上安装postgres的许多教程中的Here is one

编辑

看起来gem找不到你的postgres配置,这里有一个与你的问题类似的答案:

https://stackoverflow.com/a/9669523/277370

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14860972

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档