运行gem install pg -v'0.15.1'时出错 [英] error running gem install pg -v '0.15.1'

查看:105
本文介绍了运行gem install pg -v'0.15.1'时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行

gem install pg -v '0.15.1'

出现错误:

构建本机扩展.这可能需要一段时间...错误:错误 安装pg:错误:无法构建gem本机扩展.

Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension.

    /home/askar/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb checking for pg_config... no No pg_config... trying anyway. If

构建失败,请使用 --with-pg-config =/path/to/pg_config检查libpq-fe.h ...否找不到'libpq-fe.h标头 * extconf.rb失败* 由于某种原因(可能缺少必需的库和/或头文件)而无法创建Makefile.查看 有关更多详细信息,请参见mkmf.log文件.您可能需要配置 选项.

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.

提供的配置选项:--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 =/home/askar/.rvm/rubies/ruby​​-1.9.3-p429/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

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=/home/askar/.rvm/rubies/ruby-1.9.3-p429/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

宝石文件将继续安装在 /home/askar/.rvm/gems/ruby-1.9.3-p429/gems/pg-0.15.1进行检查. 结果记录到 /home/askar/.rvm/gems/ruby-1.9.3-p429/gems/pg-0.15.1/ext/gem_make.out

Gem files will remain installed in /home/askar/.rvm/gems/ruby-1.9.3-p429/gems/pg-0.15.1 for inspection. Results logged to /home/askar/.rvm/gems/ruby-1.9.3-p429/gems/pg-0.15.1/ext/gem_make.out

我正在使用

  1. Rails 4.0.0.rc1
  2. Ruby 1.9.3-p429
  3. Linux Mint Nadia v 14

推荐答案

您需要为pg gem安装本机扩展.

You need to install a native extension for the pg gem.

sudo apt-get install libpq-dev

这篇关于运行gem install pg -v'0.15.1'时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆