gpt4 book ai didi

ruby-on-rails - 在 OpenSUSE 中安装 PG gem

转载 作者:行者123 更新时间:2023-12-02 16:48:15 26 4
gpt4 key购买 nike

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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com