【发布时间】:2018-01-14 17:26:35
【问题描述】:
我正在使用 rails 5 和 Rubymine,当我尝试使用 bundler install 时,出现以下错误:
compiling pg_type_map_all_strings.c
compiling pg_type_map_by_class.c
compiling pg_type_map_by_column.c
compiling pg_type_map_by_mri_type.c
compiling pg_type_map_by_oid.c
compiling pg_type_map_in_ruby.c
compiling util.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
make failed, exit code 2
Gem files will remain installed in
/Users/theopap/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/pg-1.0.0 for
inspection.
Results logged to
/Users/theopap/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/extensions/x86_6
4-darwin-16/2.4.0-static/pg-1.0.0/gem_make.out
An error occurred while installing pg (1.0.0), and Bundler cannot continue.
Make sure that `gem install pg -v '1.0.0'` succeeds before bundling.
In Gemfile:
pg
我尝试卸载pg gem 并根据@Neeraj Gupta 的answer 安装新的,但在bundler install 之后仍然出现此错误。
任何想法为什么会发生这种情况?
【问题讨论】:
-
你安装了 PostgreSQL 吗?
-
感谢@Leo Correa 的回复。是的,我愿意。
postgres (PostgreSQL) 10.1来自终端与postgres -V -
我忘了说我正在使用 Rubymine