gpt4 book ai didi

ruby-on-rails - 安装pg(0.17.1)时出错,Bundler无法继续

转载 作者:行者123 更新时间:2023-11-29 11:04:55 25 4
gpt4 key购买 nike

我刚刚安装了 Rails 4.0.2 并且在创建新应用程序时,在捆绑阶段我得到:

Installing pg (0.17.1) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/Dee/.rvm/rubies/ruby-2.0.0-p247/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.

我该如何解决这个问题?

最佳答案

这里报告了某种错误 Installing PG gem on OS X - failure to build native extension

要在 Ubuntu 上安装依赖项,试试这个:

sudo apt-get install libpq-dev

还有这个

gem install pg

关于ruby-on-rails - 安装pg(0.17.1)时出错,Bundler无法继续,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20754081/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com