gpt4 book ai didi

postgresql - 无法让 postgresql 数据库找到 pg_config 文件

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

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/Users/markhoyt/.rvm/rubies/ruby-2.0.0-p451/bin/ruby extconf.rb --with-pg-config=/usr/pgsql-9.1/bin/pg_config
Using config values from /usr/pgsql-9.1/bin/pg_config
sh: /usr/pgsql-9.1/bin/pg_config: No such file or directory
sh: /usr/pgsql-9.1/bin/pg_config: No such file or directory
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.

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=/Users/markhoyt/.rvm/rubies/ruby-2.0.0-p451/bin/ruby
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-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}/

extconf failed, exit code 1

Gem files will remain installed in /Users/markhoyt/Desktop/KeyToLife/KeyToLife/KEYTOLIFEPG/KeyToLifeApp/vendor/bundle/ruby/2.0.0/gems/pg-0.18.1 for inspection.
Results logged to /Users/markhoyt/Desktop/KeyToLife/KeyToLife/KEYTOLIFEPG/KeyToLifeApp/vendor/bundle /ruby/2.0.0/extensions/x86_64-darwin-12/2.0.0-static/pg-0.18.1/gem_make.out

我已经为此工作了两天,并且已经尝试了所有我能从堆栈溢出中得到的东西。我已经安装了 PG 应用程序,尝试使用 pg config 定位和设置路径,但无法正确设置。

 locate pg_config
/usr/local/Cellar/postgresql/9.4.1/bin/pg_config
/usr/local/Cellar/postgresql/9.4.1/include/ecpg_config.h
/usr/local/Cellar/postgresql/9.4.1/include/pg_config.h
/usr/local/Cellar/postgresql/9.4.1/include/pg_config_ext.h
/usr/local/Cellar/postgresql/9.4.1/include/pg_config_manual.h
/usr/local/Cellar/postgresql/9.4.1/include/pg_config_os.h
/usr/local/Cellar/postgresql/9.4.1/include/server/pg_config.h
/usr/local/Cellar/postgresql/9.4.1/include/server/pg_config_ext.h
/usr/local/Cellar/postgresql/9.4.1/include/server/pg_config_manual.h
/usr/local/Cellar/postgresql/9.4.1/include/server/pg_config_os.h
/usr/local/Cellar/postgresql/9.4.1/share/man/man1/pg_config.1
/usr/local/bin/pg_config
/usr/local/include/ecpg_config.h
/usr/local/include/pg_config.h
/usr/local/include/pg_config_ext.h
/usr/local/include/pg_config_manual.h
/usr/local/include/pg_config_os.h
/usr/local/share/man/man1/pg_config.1

如有任何帮助,我们将不胜感激!

最佳答案

你运行的是什么操作系统?苹果 ? GNU/Linux ?

如果您在 MacOS 上运行,一个不错的选择是 Postgres.app ( http://postgresapp.com ),它可能适合您的需要。它在各种框架上对我来说一直完美无缺。

另外,我猜你也检查了头文件?的输出是什么: 找到 libpq-fe.h?

关于postgresql - 无法让 postgresql 数据库找到 pg_config 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28534894/

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