相关疑难解决方法(0)

用'gem pq'安装PostgreSQL gem失败了ERROR:无法构建gem native扩展

我正在学习Ruby on Rails并尝试开发一个应用程序.在我的应用我试图使用默认的开发模式SQLite数据库PostgreSQL的在生产模式.但是在尝试使用以下命令安装pg gem时出现以下错误:gem install pg

Building native extensions.  This could take a while...
ERROR:  Error installing pg:
        ERROR: Failed to build gem native extension.
 
    /home/tusharkhatiwada/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev
 for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev
 for building a client-side application.
checking for libpq-fe.h... no
Can't …
Run Code Online (Sandbox Code Playgroud)

ruby postgresql gem ruby-on-rails pg

34
推荐指数
1
解决办法
2万
查看次数

标签 统计

gem ×1

pg ×1

postgresql ×1

ruby ×1

ruby-on-rails ×1