无法安装PG宝石 [英] unable to install pg gem
本文介绍了无法安装PG宝石的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用 gem install pg
,但它似乎没有用。
gem install pg
给出此错误
临时增强PATH以包含DevKit ...
构建本地扩展。这可能需要一段时间...
错误:安装pg时出错:
错误:无法构建gem本机扩展。
C:/Ruby/bin/ruby.exe extconf.rb
检查pg_config ... no
没有pg_config ...无论如何。如果构建失败,请再次尝试使用
--with-pg-config = / path / to / pg_config
检查libpq-fe.h ... no
无法找到'libpq-fe.h头文件
*** extconf.rb失败***
由于某种原因无法创建Makefile,可能缺少
必需的库和/或头文件。查看mkmf.log文件以获取更多
的详细信息。您可能需要配置选项。
提供的配置选项:
--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 = C:/ Ruby / 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文件将保留在C:/Ruby/lib/ruby/gems/1.8/gems/pg- 0.10.1为
检查。
记录到C的结果:/Ruby/lib/ruby/gems/1.8/gems/pg-0.10.1/ext/gem_make.out
解决方案
在这里回答:
无法在Windows上安装pg gem
没有Windows原生版本
最新版本的pg(0.10.0)昨天发布了
,但是如果你安装了0.9.0,
应该安装二进制文件而不需要
的问题。
I tried using gem install pg
but it doesn't seem to work.
gem install pg
gives this error
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe 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=C:/Ruby/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 C:/Ruby/lib/ruby/gems/1.8/gems/pg-0.10.1 for
inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/pg-0.10.1/ext/gem_make.out
解决方案
Answered here: Can't install pg gem on Windows
There is no Windows native version of latest release of pg (0.10.0) released yesterday, but if you install 0.9.0 it should install binaries without issues.
这篇关于无法安装PG宝石的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文