在MacOS上安装do_postgres

时间:2014-03-23 00:53:59

标签: postgresql bundler psql

我在这里完全不知所措。我的宝石文件中有`dm-postgres-adapter',这让我很头疼。

当我在推送到heroku之前在一个小应用程序上运行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 main() in -lpq... yes
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for postgres.h... yes
checking for mb/pg_wchar.h... no
*** 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-pgsql-server-dir
    --without-pgsql-server-dir
    --with-pgsql-server-include
    --without-pgsql-server-include=${pgsql-server-dir}/include
    --with-pgsql-server-lib
    --without-pgsql-server-lib=${pgsql-server-dir}/
    --with-pgsql-client-dir
    --without-pgsql-client-dir
    --with-pgsql-client-include
    --without-pgsql-client-include=${pgsql-client-dir}/include
    --with-pgsql-client-lib
    --without-pgsql-client-lib=${pgsql-client-dir}/
    --with-pqlib
    --without-pqlib
Could not find PostgreSQL build environment (libraries & headers): Makefile not created


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/do_postgres-0.10.14 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/do_postgres-0.10.14/ext/do_postgres/gem_make.out

An error occurred while installing do_postgres (0.10.14), and Bundler cannot continue.
Make sure that `gem install do_postgres -v '0.10.14'` succeeds before bundling.

我花了最后几个小时在互联网上磕磕绊绊,所以我会列出我试图无效的内容:

通过brew完全重新安装postgresql。 与--with-pg-config=PATH(或类似的东西)一起运行 将postgres添加到我的路径中 软链接gcc到gcc4.2

我知道mb / pg_wchar.h位于何处。它在/usr/local/Cellar/postgresql/9.3.4/include/server/mb/pg_wchar.h/就在那里。我已尝试用usr/local/Cellar/postgresql/9.3.4/include/server/列出的大多数选项,但我尝试过的都没有。我认为值得注意的是postgres.hmb/pg_wchar.h文件夹中的/server/位于同一目录中。

如果有人能够对此有所了解,那就太棒了。

0 个答案:

没有答案