关于ruby:安装pg(0.15.1)时发生错误; Mac上的PostgreSQL安装错误:无pg

您所在的位置:网站首页 猎头公司找到你,入职希望大吗 关于ruby:安装pg(0.15.1)时发生错误; Mac上的PostgreSQL安装错误:无pg

关于ruby:安装pg(0.15.1)时发生错误; Mac上的PostgreSQL安装错误:无pg

#关于ruby:安装pg(0.15.1)时发生错误; Mac上的PostgreSQL安装错误:无pg| 来源: 网络整理| 查看: 265

我有OSX 10.6.8,正在尝试在设备上安装PostgreSQL 9.2。我使用了他们网站上提供的图形安装程序,并设置了软件,而没有使用堆栈生成器来另外配置其他功能。

当我加载Rails文件和bundle install时,遇到以下错误:

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879Fetching gem metadata from https://rubygems.org/........ Fetching gem metadata from https://rubygems.org/.. Resolving dependencies... Using rake (10.1.0) Using i18n (0.6.4) Using minitest (4.7.5) Using multi_json (1.7.7) Using atomic (1.1.10) Using thread_safe (0.1.0) Using tzinfo (0.3.37) Using activesupport (4.0.0) Using builder (3.1.4) Using erubis (2.7.0) Using rack (1.5.2) Using rack-test (0.6.2) Using actionpack (4.0.0)   Using formatador (0.2.4) Using rb-fsevent (0.9.3) Using rb-inotify (0.9.0) Using rb-kqueue (0.2.0) Using listen (1.2.2) Using lumberjack (1.0.4) Using method_source (0.8.1) Using slop (3.4.5) Using pry (0.9.12.2) Using guard (1.8.1) Using rspec-core (2.13.1) Using rspec-expectations (2.13.0) Using turbolinks (1.2.0) Using jquery-turbolinks (1.0.0) Using jquery-ui-rails (4.0.3) Using json (1.8.0) Using kaminari (0.14.1) Using nested_form (0.3.2) Installing pg (0.15.1) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.     /usr/local/rvm/rubies/ruby-1.9.3-p448/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. 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=/usr/local/rvm/rubies/ruby-1.9.3-p448/bin/ruby --with-pg --without-pg --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib --with-pg-config --without-pg-config --with-pg_config --without-pg_config Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p448/gems/pg-0.15.1     for inspection. Results logged to /usr/local/rvm/gems/ruby-1.9.3-p448/gems/pg-0.15.1/ext/gem_make.out An error occurred while installing pg (0.15.1), and Bundler cannot continue. Make sure that `gem install pg -v '0.15.1'` succeeds before bundling.

我尝试了gem install pg -- --with-pg-config=/Library/PostgreSQL/9.1/bin/pg_config,这里有所有错误消息建议以及解决方案。我还尝试过重新安装Postgres,找到适当的配置路径,并找到错误消息提及的mfmk.log文件(但该文件在我的计算机上不存在)。此外,在我的apps / PostgreSQL下,有一个"重新加载配置"应用程序,当我运行时,它说Server signaled。

有人知道我应该怎么做吗?我本来想尝试Homebrew,但是我发现安装程序本身无法生产功能正常的软件感到非常奇怪。

相关讨论 带有--with-pg-config=...的结果将比没有它的结果提供更多信息。

如果您使用的是Mac,请尝试:

1ARCHFLAGS="-arch x86_64" gem install pg

这对我有用(酿造安装程序告诉我这...一定要爱酿造)



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3