小编fai*_*ars的帖子

无法在 Windows 上安装 pg gem

我正在尝试在我的项目中安装 pg gem,但是当我运行 gem install pg 或运行 bundle install 时出现以下错误:

ERROR:  Error installing pg:
    ERROR: Failed to build gem native extension.

current directory: /home/ec2-user/.rvm/gems/ruby-2.6.3/gems/pg-1.1.4/ext
/home/ec2-user/.rvm/rubies/ruby-2.6.3/bin/ruby -I /home/ec2- 
user/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0 -r 
./siteconf20191103-5491-ro2ye0.rb 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 …
Run Code Online (Sandbox Code Playgroud)

ruby windows postgresql rubygems pg

1
推荐指数
1
解决办法
924
查看次数

标签 统计

pg ×1

postgresql ×1

ruby ×1

rubygems ×1

windows ×1