简体   繁体   English

安装pg(0.19.0)时发生错误,Bundler无法继续

[英]An error occurred while installing pg (0.19.0), and Bundler cannot continue

Yesterday I install Ubuntu 16.04.1. 昨天我安装了Ubuntu 16.04.1。

ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] ruby 2.3.1p112(2016-04-26修订版54768)[x86_64-linux]

rails -v '4.2.6' create a rails project rails -v'4.2.6'创建一个rails项目

run bundle and have an error: 运行bundle并出错:

Errno::EACCES: Permission denied @ rb_sysopen - /home/zeus/.rbenv/versions /2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.19.0/.gemtest
An error occurred while installing pg (0.19.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.19.0'` succeeds before bundling.

When run gem install pg -v '0.19.0' 运行gem install pg -v '0.19.0'

ERROR:  While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /home/zeus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.19.0/.gemtest

In Ubuntu, You need to install libpq-dev package. 在Ubuntu中,您需要安装libpq-dev软件包。 Try this one: 试试这个:

sudo apt-get install libpq-dev

For CentOS 7, You need install postgresql-devel package. 对于CentOS 7,您需要安装postgresql-devel软件包。

sudo yum install postgresql-devel

It is a permission issue. 这是一个许可问题。 Try 尝试

sudo chown -R zeus ~/.rbenv

Here zeus is your username. 这里zeus是你的用户名。

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

相关问题 安装pg(0.15.1)时发生错误,Bundler无法继续 - error occurred while installing pg (0.15.1), and Bundler cannot continue 安装pg(1.1.4)时发生错误,并且Bundler无法继续 - An error occurred while installing pg (1.1.4), and Bundler cannot continue 安装pg(1.2.1)时出错,Bundler无法继续 - An error occurred while installing pg (1.2.1), and Bundler cannot continue 安装pg(1.2.3)时出错,Bundler无法继续 - An error occurred while installing pg (1.2.3), and Bundler cannot continue 安装 pg (0.15.1) 时出错,Bundler 无法继续 - An error occurred while installing pg (0.15.1), and Bundler cannot continue 安装pg(0.18.2)时发生错误,并且Bundler无法继续 - An error occurred while installing pg (0.18.2), and Bundler cannot continue 安装 pg (0.18.4) 时出错,Bundler 无法继续 - An error occurred while installing pg (0.18.4), and Bundler cannot continue 安装 pg (0.17.1) 时出错,Bundler 无法继续 - An error occurred while installing pg (0.17.1), and Bundler cannot continue Ubuntu 14.04-安装pg(0.18.2)时发生错误,并且Bundler无法继续 - Ubuntu 14.04 - An error occurred while installing pg (0.18.2), and Bundler cannot continue Rails - 安装 pg (1.1.3) 时出现 Gem 错误,并且 Bundler 无法继续 - Rails - Gem Error while installing pg (1.1.3), and Bundler cannot continue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM