我正在學習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