【发布时间】:2015-06-05 08:30:19
【问题描述】:
我在华硕 Chromebook 上通过 crouton 安装了 Ubuntu 12.04 Precise。我有一个需要 postgres 的 rails 应用程序。当我运行“捆绑”时,它无法安装 pg gem。我尝试独立安装它的多个版本,但它失败了。故障报告如下:
构建原生扩展。这可能需要一段时间... 错误:安装 pg 时出错: 错误:无法构建 gem 原生扩展。
/home/oscar/.rvm/rubies/ruby-1.9.3-p551/bin/ruby -r ./siteconf20150331-16650-11xjo0a.rb extconf.rb checking forpg_config... 是 使用来自 /usr/bin/pg_config 的配置值 你需要 安装 postgresql-server-dev-X.Y 用于构建服务器端 扩展或 libpq-dev 用于构建客户端应用程序。你 需要安装 postgresql-server-dev-X.Y 来构建服务器端 扩展或 libpq-dev 用于构建客户端应用程序。 检查 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 --没有-make-prog --srcdir=。 --curdir --ruby=/home/oscar/.rvm/rubies/ruby-1.9.3-p551/bin/ruby --with-pg --没有-pg --启用-windows-cross --禁用-windows-cross --with-pg-config --without-pg-config --with-pg_config --without-pg_config --with-pg-dir --没有-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib
extconf 失败,退出代码 1
Gem 文件将继续安装在 /home/oscar/.rvm/gems/ruby-1.9.3-p551/gems/pg-0.18.1 供检查。 结果记录到 /home/oscar/.rvm/gems/ruby-1.9.3-p551/extensions/x86_64-linux/1.9.1/pg-0.18.1/gem_make.out
我也尝试使用 brew 安装它。文件已下载,似乎已安装,但是当我运行“brew upgrade postgresql”时,它说 postgresql 没有退出。我完全没有想法,也找不到其他人解决我的问题。
【问题讨论】:
标签: ruby-on-rails postgresql chromebook