283
65 我正在尝试为 Ruby 安装 PostgreSQL 的 pg gem。
我发出了以下命令:
gem install pg
I installed Ruby 1.9.2 using RVM.
The above command shows me the following error.
The error is :
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/home/User/.rvm/rubies/ruby-1.9.2-preview3/bin/ruby extconf.rb
checking for pg_config... yes
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** extconf.rb failed ***
等...
有人为 Ubuntu 用户提供了解决方案。 OpenSUSE Linux 怎么样?
感谢提前。
最佳答案
对我来说,这是解决方案:
zypper in postgresql-server-devel
pg_config 是 postgresql-server-devel 的一部分,如果你安装它的话 包那么它至少应该在 Tumbleweed 上工作。
来源:https://lists.opensuse.org/opensuse-factory/2019-03/msg00300.html
关于ruby-on-rails - 在 OpenSUSE 中安装 PG gem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59691127/