如何在 codenvy.io/goormide.io 中安装gem pg和mysql2?



日志终端:

user@c6b65b118139:/projects/rails-jafar$ gem install pg
Building native extensions. This could take a while...
ERROR:  Error installing pg:
ERROR: Failed to build gem native extension.
current directory: /usr/local/bundle/gems/pg-1.1.4/ext
/usr/local/bin/ruby -r ./siteconf20190831-425-ife1vi.rb extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

apt-get install libmysqlclient-dev

libmysqlclient-dev E: 无法打开锁定文件/var/lib/dpkg/lock - 打开(13:权限被拒绝( E:无法锁定管理 目录 (/var/lib/dpkg/(,你是 root 吗?

goorm.io 我用安装 libpq-dev 解决

apt-get install libpq-dev
sudo apt-get update
sudo apt-get install mysql-client libmysqlclient-dev
gem install mysql2

相关内容

  • 没有找到相关文章

最新更新