我正在学习R o R.然后,我想通过使用postgresql制作一个网站。 但是,这个错误让我发疯。 请帮帮我!无法捆绑安装,因为'pg'
$ 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的传递。 但是,我不能。
然后,我试过
$ brew update
$ brew uninstall postgresql
$ brew install postgresql
$ gem install pg
$ bundle install
但是,它没有工作。
我该怎么办这个错误!?
你应该考虑使用像'rvm'或'rbenv'。你不需要担心使用'sudo'来安装任何东西。 – 2014-09-26 14:47:43
OP *是*使用RBEnv,只是不正确。 *永远不要使用'sudo'来搭配RBEnv或RVM托管的Ruby。 – 2014-09-26 15:32:54
“它没有用”是什么意思?它静静地死了?它给了你一个错误输出,但你不明白吗?我们需要更多关于输出内容的信息。 – 2014-09-26 15:37:53