简体   繁体   English

尝试在 linux 上为 Ruby 安装 postgres

[英]Trying to install postgres for Ruby on linux

im trying to install PG for a project and keep getting the following error while running bundle install:我试图为一个项目安装 PG 并在运行 bundle install 时不断收到以下错误:

An error occurred while installing pg (0.18.4), and Bundler cannot continue.安装 pg (0.18.4) 时出错,Bundler 无法继续。 Make sure that gem install pg -v '0.18.4' --source 'https://rubygems.org/' succeeds before bundling.在捆绑之前确保gem install pg -v '0.18.4' --source 'https://rubygems.org/'成功。

If i try to run gem install pg -v '0.18.4' --source 'https://rubygems.org/' , it freezes my console, any ideas of a fix?如果我尝试运行gem install pg -v '0.18.4' --source 'https://rubygems.org/' ,它会冻结我的控制台,有什么解决办法吗?

I fixed the issue, how I fixed it was I ran我解决了这个问题,我如何解决它是我跑的

apt-get install libpq-dev apt-get 安装 libpq-dev

then然后

sudo gem install pg -v '0.18.4' sudo gem install pg -v '0.18.4'

then tried to bundle install and was successful然后尝试捆绑安装并成功

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM