2
這裏是我做過什麼:RVM不會安裝Ruby - 我甚至降級的XCode 4.1 - 錯誤涉及的ReadLine
$ rvm install ruby-1.8.7-p352
Installing Ruby from source to: /Users/me/.rvm/rubies/ruby-1.8.7-p352, this may take a while depending on your cpu(s)...
ruby-1.8.7-p352 - #fetching
ruby-1.8.7-p352 - #extracted to /Users/me/.rvm/src/ruby-1.8.7-p352 (already extracted)
Applying patch 'stdout-rouge-fix' (located at /Users/me/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch)
ERROR: Error running 'patch -F25 -p1 -f <"/Users/me/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"', please read /Users/me/.rvm/log/ruby-1.8.7-p352/patch.apply.stdout-rouge-fix.log
Applying patch 'no_sslv2' (located at /Users/me/.rvm/patches/ruby/1.8.7/no_sslv2.diff)
ruby-1.8.7-p352 - #configuring
ruby-1.8.7-p352 - #compiling
ERROR: Error running 'make ', please read /Users/me/.rvm/log/ruby-1.8.7-p352/make.log
ERROR: There has been an error while running make. Halting the installation.
這是第一個錯誤日誌的內容, patch.apply.stdout-胭脂fix.log:
[2012-02-02 14:08:02] patch -F25 -p1 -f <"/Users/me/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"
patching file lib/mkmf.rb
Hunk #1 FAILED at 201.
1 out of 1 hunk FAILED -- saving rejects to file lib/mkmf.rb.rej
然後從make.log裏
的最後幾行compiling readline
/usr/bin/gcc-4.2 -I. -I../.. -I../../. -I../.././ext/readline -DHAVE_READLINE_READLINE_H -DHAVE_READLINE_HISTORY_H -DHAVE_RL_FILENAME_COMPLETION_FUNCTION -DHAVE_RL_COMPLETION_MATCHES -DHAVE_RL_DEPREP_TERM_FUNCTION -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_BASIC_WORD_BREAK_CHARACTERS -DHAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS -DHAVE_RL_BASIC_QUOTE_CHARACTERS -DHAVE_RL_COMPLETER_QUOTE_CHARACTERS -DHAVE_RL_FILENAME_QUOTE_CHARACTERS -DHAVE_RL_ATTEMPTED_COMPLETION_OVER -DHAVE_RL_LIBRARY_VERSION -DHAVE_RL_EVENT_HOOK -DHAVE_RL_CLEANUP_AFTER_SIGNAL -DHAVE_REPLACE_HISTORY_ENTRY -DHAVE_REMOVE_HISTORY -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -fno-common -pipe -fno-common -c readline.c
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
那麼,我雖然,嘿! readline,其他人都遇到了問題......所以,我應該在安裝ruby之前先用rvm安裝它。
我做
rvm pkg install readline
這工作得很好。
然後我做了
rvm reinstall 1.8.7
,並且還得到了一個錯誤,此時只有一個。仍然與readline有關。
於是,我又試圖這樣的:
rvm reinstall 1.8.7 --with-readline-dir=$rvm_path/usr
現在一切正常。
所以..因爲它是固定的Mac獅子的方式和RVM總之發出
熱潮!很好,謝謝。修復安裝1.9.2和1.9.3的相同問題 – Rob 2012-05-06 19:31:17