【问题标题】:error running gem install pg -v '0.15.1'运行 gem install pg -v '0.15.1' 时出错
【发布时间】:2013-05-23 04:32:04
【问题描述】:

跑步

gem install pg -v '0.15.1'

给出错误:

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

    /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 failed * 由于某种原因无法创建 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=/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

Gem 文件将继续安装在 /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

我正在使用

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

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-4 pg linux-mint


    【解决方案1】:

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

    sudo apt-get install libpq-dev
    

    【讨论】:

      猜你喜欢
      • 2016-04-11
      • 2014-03-30
      • 2014-02-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-27
      • 2012-10-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多