PG::Connection.ping 失败并显示 - 未找到符号:_PQping
PG::Connection.ping fails with - Symbol not found: _PQping
我在 Postgres 9.4.1 上遇到这个错误:
dyld: lazy symbol binding failed: Symbol not found: _PQping
Referenced from: <home_dir>/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/pg-0.21.0/lib/pg_ext.bundle
Expected in: /usr/local/lib/libpq.5.dylib
/usr/local/lib/libpq.5.dylib
链接到 postgresql@9.6
版本
/usr/local/lib/libpq.5.dylib -> ../Cellar/postgresql@9.6/9.6.5/lib/libpq.5.dylib
然后,我升级到 9.6.5 使用:
brew install/upgrade
但仍然出现错误。 pg
gem 看起来不错,我可以从我的 Rails 应用程序连接并查询我的模型。
如何修复错误?
尝试 $ gem uninstall pg
然后 $ bundle install
我在 Postgres 9.4.1 上遇到这个错误:
dyld: lazy symbol binding failed: Symbol not found: _PQping
Referenced from: <home_dir>/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/pg-0.21.0/lib/pg_ext.bundle
Expected in: /usr/local/lib/libpq.5.dylib
/usr/local/lib/libpq.5.dylib
链接到 postgresql@9.6
版本
/usr/local/lib/libpq.5.dylib -> ../Cellar/postgresql@9.6/9.6.5/lib/libpq.5.dylib
然后,我升级到 9.6.5 使用:
brew install/upgrade
但仍然出现错误。 pg
gem 看起来不错,我可以从我的 Rails 应用程序连接并查询我的模型。
如何修复错误?
尝试 $ gem uninstall pg
然后 $ bundle install