错误运行gem install pg -v’0.15.1′
运行
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 header * 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 = / 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
我正在使用
- Rails 4.0.0.rc1
- Ruby 1.9.3-p429
- Linux Mint Nadia v 14
您需要为pg
gem安装本机扩展。
sudo apt-get install libpq-dev