0

OSX 10.6.8 を使用しており、PostgreSQL 9.2 をデバイスにインストールしようとしています。私は彼らのウェブサイトで入手可能なグラフィカルインストーラーを使用し、最後にスタックビルダーを使用して他の機能を追加設定することなく、ソフトウェアをセットアップしました。

Rails ファイルをロードするbundle installと、次のエラーが発生します。

Fetching 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 ファイルの検索も試みました (ただし、ファイルはコンピューターに存在しません)。さらに、私のアプリ/PostgreSQL の下には、「構成の再読み込み」アプリケーションがあり、実行するとServer signaled.

私が何をすべきか知っている人はいますか?私は Homebrew を試すつもりでしたが、インストーラー自体が機能するソフトウェアを作成できないのは非常に奇妙でした。

4

1 に答える 1

1

Mac を使用している場合は、次を試してください。

ARCHFLAGS="-arch x86_64" gem install pg

これは私にとってはうまくいきました(醸造インストーラーは私にこれを教えてくれました...醸造が大好きです)

于 2013-12-12T08:51:59.513 に答える