运行gem install pg

编程入门 行业动态 更新时间:2024-10-21 06:34:40
本文介绍了运行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

我正在使用

  • Rails 4.0.0.rc1
  • Ruby 1.9.3-p429
  • 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

    本文发布于:2023-10-15 03:01:11,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1493044.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:gem   install   pg

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!