2011-05-11 25 views
0

我在我的機架應用程序(以前使用.gems)中創建了一個Gemfile。當我運行「捆綁」時,我有以下錯誤鏈接到「do_postgres」。我記得過去在我的機器上安裝了postgres(mac OS),但似乎無法找到這些庫。有任何想法嗎 ?安裝帶包的do_postgres

... 
Using dm-core (1.1.0) 
Using dm-do-adapter (1.1.0) 
Using dm-migrations (1.1.0) 
Installing do_postgres (0.10.5) with native extensions /Library/Ruby/Site/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) 

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb 
extconf.rb:3: command not found: pg_config --includedir-server 
extconf.rb:13: command not found: pg_config --libdir 
extconf.rb:13: command not found: pg_config --includedir 
extconf.rb:13: command not found: pg_config --libdir 
checking for main() in -lpq... no 
checking for main() in -llibpq... 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/1.8/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}/lib 
    --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}/lib 
    --with-pqlib 
    --without-pqlib 
    --with-libpqlib 
    --without-libpqlib 
Could not find PostgreSQL build environment (libraries & headers): Makefile not created 

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/do_postgres-0.10.5 for inspection. 
Results logged to /Library/Ruby/Gems/1.8/gems/do_postgres0.10.5/ext/do_postgres/gem_make.out 
    from /Library/Ruby/Site/1.8/rubygems/installer.rb:446:in `each' 
    from /Library/Ruby/Site/1.8/rubygems/installer.rb:446:in `build_extensions' 
    from /Library/Ruby/Site/1.8/rubygems/installer.rb:198:in `install' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:96:in `install' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:55:in `run' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:44:in `run' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in `install' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/cli.rb:226:in `install' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `send' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `run' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in `dispatch' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in `start' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/bin/bundle:13 
    from /usr/bin/bundle:19:in `load' 
    from /usr/bin/bundle:19 

回答

0

sudo易於得到安裝PostgreSQL-9.3的PostgreSQL服務器-DEV-9.3的libpq-dev的

修正了我。

+0

OP被問到關於OSX,而​​不是Ubuntu .. – Doon 2015-09-03 16:17:44

+0

抱歉,沒有看到 – 2015-09-03 16:26:31