gpt4 book ai didi

ruby-on-rails - 在 postgresql gem 上 bundle 安装失败。 (是的,已安装 postgres)

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

我正在尝试在新机器上运行 bundle install。我刚刚安装了 postgres.app 并重新启动了终端。在我的应用程序中运行 bundle install 会返回此错误。

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/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... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** 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.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib


Gem files will remain installed in /var/folders/1p/11m5t6_j76xddb5wrkckgn8m0000gp/T/bundler20150524-32619-10b4nv5pg-0.18.1/gems/pg-0.18.1 for inspection.
Results logged to /var/folders/1p/11m5t6_j76xddb5wrkckgn8m0000gp/T/bundler20150524-32619-10b4nv5pg-0.18.1/gems/pg-0.18.1/ext/gem_make.out
An error occurred while installing pg (0.18.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.1'` succeeds before bundling.

对于如何解决此问题的任何建议,我们将不胜感激。感谢您的宝贵时间!

最佳答案

我认为,如果您安装这个软件包 libpq-dev,它会有所帮助。您可以像这样安装它:sudo apt-get install libpq-dev。如需更多信息,您也可以查看此网站:https://gorails.com/setup/ubuntu/15.04 .

关于ruby-on-rails - 在 postgresql gem 上 bundle 安装失败。 (是的,已安装 postgres),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30428436/

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