gpt4 book ai didi

ruby-on-rails - 由于 'pg',无法捆绑安装

转载 作者:行者123 更新时间:2023-11-29 13:30:03 25 4
gpt4 key购买 nike

我正在学习R o R。然后,我想用postgresql做一个网站。但是,这个错误让我发疯。请帮帮我!

$ sudo bundle install

creating Makefile

make "DESTDIR="
compiling gvl_wrappers.c
compiling pg.c
compiling pg_connection.c
pg_connection.c:2323:3: warning: implicit declaration of function 'gettimeofday' is invalid in C99 [-Wimplicit-function-declaration]
gettimeofday(&currtime, NULL);
^
1 warning generated.
compiling pg_errors.c
compiling pg_result.c
linking shared-object pg_ext.bundle
ld: file not found: dynamic_lookup
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pg_ext.bundle] Error 1

Gem files will remain installed in /Users/Sean/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.17.1 for inspection.
Results logged to /Users/Sean/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.17.1/ext/gem_make.out
An error occurred while installing pg (0.17.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.17.1'` succeeds before bundling.

我尽了一切可能。

例如,我尝试更改pg的pass。但是,我不能。

然后,我尝试了

$ brew update
$ brew uninstall postgresql
$ brew install postgresql
$ gem install pg
$ bundle install

但是,它没有用。

这个错误我该怎么办!?

最佳答案

您可能需要 libpq-dev,当我尝试在新机器上安装 pg gem 时,我总是会使用它。

关于ruby-on-rails - 由于 'pg',无法捆绑安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26062201/

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